diff options
| author | 2007-02-18 23:50:46 +0000 | |
|---|---|---|
| committer | 2007-02-18 23:50:46 +0000 | |
| commit | b3c11e646b403313c295d951a6c0efbc39f3e9bf (patch) | |
| tree | b12adaf0e578955e355141d1b596cb4dacc5be5a /usr.sbin/arp/arp.c | |
| parent | tidy up synopsis and usage(); from Igor Sobrado (diff) | |
| download | wireguard-openbsd-b3c11e646b403313c295d951a6c0efbc39f3e9bf.tar.xz wireguard-openbsd-b3c11e646b403313c295d951a6c0efbc39f3e9bf.zip | |
Use sizeof(buf) instead of hard coded numbers.
From Charles Longeau <chl at tuxfamily dot org> long ago.
OK moritz@.
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 f6e6bd3d97f..9b2013f573c 100644 --- a/usr.sbin/arp/arp.c +++ b/usr.sbin/arp/arp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: arp.c,v 1.38 2006/05/26 09:00:57 jmc Exp $ */ +/* $OpenBSD: arp.c,v 1.39 2007/02/18 23:50:47 ray Exp $ */ /* $NetBSD: arp.c,v 1.12 1995/04/24 13:25:18 cgd Exp $ */ /* @@ -189,7 +189,7 @@ file(char *name) args[3] = &arg[3][0]; args[4] = &arg[4][0]; retval = 0; - while (fgets(line, 100, fp) != NULL) { + while (fgets(line, sizeof(line), fp) != NULL) { i = sscanf(line, "%49s %49s %49s %49s %49s", arg[0], arg[1], arg[2], arg[3], arg[4]); if (i < 2) { |
