diff options
author | itojun <itojun@FreeBSD.org> | 2001-07-26 19:14:52 +0000 |
---|---|---|
committer | itojun <itojun@FreeBSD.org> | 2001-07-26 19:14:52 +0000 |
commit | 0a0f3b54c3fa214be9208289900f9ef8ff4e3284 (patch) | |
tree | e40f84d09197db1264b8b2a34b8c1872278acc55 | |
parent | 9c035d3b0376d1ad0193c5c0c84ed7bc5645a2d3 (diff) | |
download | FreeBSD-src-0a0f3b54c3fa214be9208289900f9ef8ff4e3284.zip FreeBSD-src-0a0f3b54c3fa214be9208289900f9ef8ff4e3284.tar.gz |
incorrect bounds-check on snprintf.
Submitted by: fenner
-rw-r--r-- | sys/net/net_osdep.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/net/net_osdep.c b/sys/net/net_osdep.c index ef3bb01..3ce162fb 100644 --- a/sys/net/net_osdep.c +++ b/sys/net/net_osdep.c @@ -1,5 +1,5 @@ /* $FreeBSD$ */ -/* $KAME: net_osdep.c,v 1.9 2001/04/06 09:22:05 itojun Exp $ */ +/* $KAME: net_osdep.c,v 1.10 2001/07/26 19:08:37 itojun Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -61,7 +61,7 @@ if_name(ifp) ifbufround = (ifbufround + 1) % MAXNUMBUF; cp = nam[ifbufround]; - snprintf(cp, sizeof(nam), "%s%d", ifp->if_name, ifp->if_unit); + snprintf(cp, IFNAMSIZ + 10, "%s%d", ifp->if_name, ifp->if_unit); return((const char *)cp); #undef MAXNUMBUF } |