From 60f8c7bf8a1c571bce71905c8129b003f2dbbf92 Mon Sep 17 00:00:00 2001 From: Theo de Raadt Date: Thu, 16 Dec 1999 07:46:52 +0000 Subject: incorrect bounds on strlcpy() --- lib/libc/net/if_indextoname.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/libc') diff --git a/lib/libc/net/if_indextoname.c b/lib/libc/net/if_indextoname.c index b05e82e9ff0..0b71010acea 100644 --- a/lib/libc/net/if_indextoname.c +++ b/lib/libc/net/if_indextoname.c @@ -111,7 +111,7 @@ if_indextoname(unsigned int index, char *name) struct sockaddr_dl *sd = p; if (sd->sdl_index == index) { - strlcpy(name, lastname, sizeof(name)); + strlcpy(name, lastname, IFNAMSIZ); retname = name; goto ret; } @@ -127,7 +127,7 @@ if_indextoname(unsigned int index, char *name) strlcpy(iname, lastname, sizeof(iname)); if (iname[0]) { - strlcpy(name, iname, sizeof(name)); + strlcpy(name, iname, IFNAMSIZ); retname = name; } ret: -- cgit v1.2.3