diff options
author | kris <kris@FreeBSD.org> | 2000-01-16 21:15:50 +0000 |
---|---|---|
committer | kris <kris@FreeBSD.org> | 2000-01-16 21:15:50 +0000 |
commit | 5ed22b480c62a4898af8da3230eb02b33b2fdb42 (patch) | |
tree | 37ea68c41cd4bfa5cf8f710198e212ee76965166 /usr.sbin/arp/arp.c | |
parent | 8643457c2364cec1f2cbcb6b4d5d9b13d8d9720a (diff) | |
download | FreeBSD-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.c | 4 |
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; |