diff options
author | hrs <hrs@FreeBSD.org> | 2014-10-11 23:08:00 +0000 |
---|---|---|
committer | hrs <hrs@FreeBSD.org> | 2014-10-11 23:08:00 +0000 |
commit | 21a1f9a46b09965a857387d87c3f630b41bd7681 (patch) | |
tree | f7d46678e84ee41ab8975a4aa86d09133feb4e79 /usr.sbin/rtadvd/advcap.c | |
parent | ec5e67f29f9ce6ce2905b16f818694565a944525 (diff) | |
download | FreeBSD-src-21a1f9a46b09965a857387d87c3f630b41bd7681.zip FreeBSD-src-21a1f9a46b09965a857387d87c3f630b41bd7681.tar.gz |
Fix off-by-one.
MFC after: 1 day
Diffstat (limited to 'usr.sbin/rtadvd/advcap.c')
-rw-r--r-- | usr.sbin/rtadvd/advcap.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/rtadvd/advcap.c b/usr.sbin/rtadvd/advcap.c index 7280f40..542e066 100644 --- a/usr.sbin/rtadvd/advcap.c +++ b/usr.sbin/rtadvd/advcap.c @@ -149,9 +149,9 @@ getent(char *bp, char *name, const char *cfile) } break; } - if (cp >= bp + BUFSIZ) { + if (cp >= bp + BUFSIZ - 1) { write(STDERR_FILENO, "Remcap entry too long\n", - 23); + 22); break; } else *cp++ = c; |