diff options
author | 2003-09-11 03:46:49 +0000 | |
---|---|---|
committer | 2003-09-11 03:46:49 +0000 | |
commit | aac294c865db776ea63ac4e8cd80d98dfd647f14 (patch) | |
tree | e5d1820560610f8c5548f0cee6b1771f90cff399 /nameif.c | |
parent | Use new style MII ioctls only. This will give you a warning, if compiled (diff) | |
download | net-tools-aac294c865db776ea63ac4e8cd80d98dfd647f14.tar.gz net-tools-aac294c865db776ea63ac4e8cd80d98dfd647f14.tar.bz2 net-tools-aac294c865db776ea63ac4e8cd80d98dfd647f14.zip |
Fix off by one in name length checking
Diffstat (limited to 'nameif.c')
-rw-r--r-- | nameif.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -3,7 +3,7 @@ * Writen 2000 by Andi Kleen. * Subject to the Gnu Public License, version 2. * TODO: make it support token ring etc. - * $Id: nameif.c,v 1.3 2003/03/06 23:26:52 ecki Exp $ + * $Id: nameif.c,v 1.4 2003/09/11 03:46:49 ak Exp $ */ #ifndef _GNU_SOURCE #define _GNU_SOURCE @@ -175,7 +175,7 @@ void readconf(void) if (*p == '\0') continue; n = strcspn(p, " \t"); - if (n > IFNAMSIZ) + if (n > IFNAMSIZ-1) complain(_("interface name too long at line %d"), line); memcpy(ch->ifname, p, n); ch->ifname[n] = 0; |