summaryrefslogtreecommitdiff
path: root/lib/libc
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1999-12-16 07:46:52 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1999-12-16 07:46:52 +0000
commit60f8c7bf8a1c571bce71905c8129b003f2dbbf92 (patch)
tree2ff4601a7725d60e3b0e7b7644365252fdc45128 /lib/libc
parent4f440c694f2d8c97f3ea6413d87298acf9dede02 (diff)
incorrect bounds on strlcpy()
Diffstat (limited to 'lib/libc')
-rw-r--r--lib/libc/net/if_indextoname.c4
1 files changed, 2 insertions, 2 deletions
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: