diff options
author | pfg <pfg@FreeBSD.org> | 2015-02-15 21:11:07 +0000 |
---|---|---|
committer | pfg <pfg@FreeBSD.org> | 2015-02-15 21:11:07 +0000 |
commit | 7459c9496a65b9f437bf0a9a597bd1a762643384 (patch) | |
tree | 10c02a2b5bb5cd67c203dde6aab4e2d8a236d6a5 /lib | |
parent | 74a6ef1ede0ac64ec0d3ee0d441451ae20dcebb1 (diff) | |
download | FreeBSD-src-7459c9496a65b9f437bf0a9a597bd1a762643384.zip FreeBSD-src-7459c9496a65b9f437bf0a9a597bd1a762643384.tar.gz |
Replace strcpy() with strlcpy()
The risk of an overrun here is very low but check the
length, JIC.
CID: 1019039
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libc/gen/fstab.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libc/gen/fstab.c b/lib/libc/gen/fstab.c index 6a77abd..c21ceb3 100644 --- a/lib/libc/gen/fstab.c +++ b/lib/libc/gen/fstab.c @@ -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, ",")) { |