summaryrefslogtreecommitdiffstats
path: root/usr.sbin/arp/arp.c
diff options
context:
space:
mode:
authorkris <kris@FreeBSD.org>2000-01-16 21:15:50 +0000
committerkris <kris@FreeBSD.org>2000-01-16 21:15:50 +0000
commit5ed22b480c62a4898af8da3230eb02b33b2fdb42 (patch)
tree37ea68c41cd4bfa5cf8f710198e212ee76965166 /usr.sbin/arp/arp.c
parent8643457c2364cec1f2cbcb6b4d5d9b13d8d9720a (diff)
downloadFreeBSD-src-5ed22b480c62a4898af8da3230eb02b33b2fdb42.zip
FreeBSD-src-5ed22b480c62a4898af8da3230eb02b33b2fdb42.tar.gz
Don't overflow buffers.
Reviewed by: audit@freebsd.org
Diffstat (limited to 'usr.sbin/arp/arp.c')
-rw-r--r--usr.sbin/arp/arp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/arp/arp.c b/usr.sbin/arp/arp.c
index 0343bd2..cb96880 100644
--- a/usr.sbin/arp/arp.c
+++ b/usr.sbin/arp/arp.c
@@ -212,8 +212,8 @@ file(char *name)
args[4] = &arg[4][0];
retval = 0;
while(fgets(line, 100, fp) != NULL) {
- i = sscanf(line, "%s %s %s %s %s", arg[0], arg[1], arg[2],
- arg[3], arg[4]);
+ i = sscanf(line, "%49s %49s %49s %49s %49s", arg[0], arg[1],
+ arg[2], arg[3], arg[4])
if (i < 2) {
warnx("bad line: %s", line);
retval = 1;
OpenPOWER on IntegriCloud