Page MenuHomeFreeBSD

Simplify string mangling in ifmaybeload().
ClosedPublic

Authored by jhb on Feb 9 2015, 10:20 PM.
Tags
None
Referenced Files
F171574212: D1814.diff
Fri, Sep 11, 8:33 PM
Unknown Object (File)
Mon, Sep 7, 5:51 PM
Unknown Object (File)
Tue, Aug 25, 11:13 AM
Unknown Object (File)
Sun, Aug 23, 4:35 AM
Unknown Object (File)
Sun, Aug 23, 2:14 AM
Unknown Object (File)
Fri, Aug 21, 3:51 PM
Unknown Object (File)
Fri, Aug 14, 4:14 PM
Unknown Object (File)
Aug 9 2026, 6:15 PM
Subscribers

Details

Summary

Use strlcpy() instead of a strcpy() and use strlcat() instead of
a strlcpy() with a magic number subtracted from the length.
Also, replace strncmp(..., strlen(foo) + 1) with strcmp(...).

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

jhb retitled this revision from to Simplify string mangling in ifmaybeload()..
jhb updated this object.
jhb edited the test plan for this revision. (Show Details)
jhb added a reviewer: emaste.

I've runtested this now and it works fine.

rpaulo added a reviewer: rpaulo.
This revision is now accepted and ready to land.Mar 13 2015, 9:36 AM
jhb updated this revision to Diff 4209.

Closed by commit rS279951 (authored by @jhb).