summaryrefslogtreecommitdiffstats
path: root/sys/net/if.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/net/if.c')
-rw-r--r--sys/net/if.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/net/if.c b/sys/net/if.c
index e8ef47f..5d67e49 100644
--- a/sys/net/if.c
+++ b/sys/net/if.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)if.c 8.3 (Berkeley) 1/4/94
- * $Id: if.c,v 1.28 1996/02/08 21:34:56 wollman Exp $
+ * $Id: if.c,v 1.29 1996/03/11 15:13:00 davidg Exp $
*/
#include <sys/param.h>
@@ -452,6 +452,8 @@ ifunit(name)
ep = cp;
for (unit = 0; *cp >= '0' && *cp <= '9'; )
unit = unit * 10 + *cp++ - '0';
+ if (*cp != '\0')
+ return 0; /* no trailing garbage allowed */
*ep = 0;
for (ifp = ifnet; ifp; ifp = ifp->if_next) {
if (bcmp(ifp->if_name, name, len))
OpenPOWER on IntegriCloud