Replace strcpy() with strlcpy()

The risk of an overrun here is very low but check the
length, JIC.

CID:	1019039
This commit is contained in:
Pedro F. Giffuni 2015-02-15 21:11:07 +00:00
parent 1a4161a15d
commit 78a452c36e

View File

@ -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, ",")) {