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, ",")) { _______________________________________________ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"