Page MenuHomeFreeBSD

Simplify string mangling in ifmaybeload().
ClosedPublic

Authored by jhb on Feb 9 2015, 10:20 PM.
Tags
None
Referenced Files
Unknown Object (File)
Oct 1 2024, 6:04 AM
Unknown Object (File)
Sep 23 2024, 1:14 PM
Unknown Object (File)
Sep 23 2024, 10:23 AM
Unknown Object (File)
Sep 23 2024, 2:06 AM
Unknown Object (File)
Sep 22 2024, 7:25 PM
Unknown Object (File)
Sep 18 2024, 5:45 PM
Unknown Object (File)
Sep 18 2024, 11:26 AM
Unknown Object (File)
Sep 16 2024, 3:37 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).