diff options
author | 1999-12-16 07:46:51 +0000 | |
---|---|---|
committer | 1999-12-16 07:46:51 +0000 | |
commit | 10e056e08b4cf279502319453d5aa2ceddfa40ee (patch) | |
tree | 27f4aac5b9a587c641a3ca9897b49fa6107f7e40 /lib/libc | |
parent | Add the ability to use interface names in place of addresses (diff) | |
download | wireguard-openbsd-10e056e08b4cf279502319453d5aa2ceddfa40ee.tar.xz wireguard-openbsd-10e056e08b4cf279502319453d5aa2ceddfa40ee.zip |
incorrect bounds on strlcpy()
Diffstat (limited to 'lib/libc')
-rw-r--r-- | lib/libc/net/if_indextoname.c | 4 |
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: |