mirror of
https://git.openwrt.org/project/iwinfo.git
synced 2025-12-20 01:02:49 +08:00
wext_scan: fix possibly unterminated ifname string
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
This commit is contained in:
@@ -25,7 +25,7 @@
|
||||
|
||||
static int wext_ioctl(const char *ifname, int cmd, struct iwreq *wrq)
|
||||
{
|
||||
strncpy(wrq->ifr_name, ifname, IFNAMSIZ);
|
||||
strncpy(wrq->ifr_name, ifname, IFNAMSIZ - 1);
|
||||
return iwinfo_ioctl(cmd, wrq);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user