svn commit: r278815 - head/lib/libc/gen
Pedro F. Giffuni
pfg at FreeBSD.org
Sun Feb 15 21:11:08 UTC 2015
Author: pfg
Date: Sun Feb 15 21:11:07 2015
New Revision: 278815
URL: https://svnweb.freebsd.org/changeset/base/278815
Log:
Replace strcpy() with strlcpy()
The risk of an overrun here is very low but check the
length, JIC.
CID: 1019039
Modified:
head/lib/libc/gen/fstab.c
Modified: head/lib/libc/gen/fstab.c
==============================================================================
--- head/lib/libc/gen/fstab.c Sun Feb 15 21:03:49 2015 (r278814)
+++ head/lib/libc/gen/fstab.c Sun Feb 15 21:11:07 2015 (r278815)
@@ -181,7 +181,7 @@ fstabscan(void)
if (cp != NULL)
_fs_fstab.fs_passno = atoi(cp);
}
- strcpy(subline, _fs_fstab.fs_mntops);
+ (void)strlcpy(subline, _fs_fstab.fs_mntops, sizeof(subline));
p = subline;
for (typexx = 0, cp = strsep(&p, ","); cp;
cp = strsep(&p, ",")) {
More information about the svn-src-all
mailing list