wext_scan: fix possibly unterminated ifname string

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
This commit is contained in:
Jo-Philipp Wich 2015-10-29 10:53:32 +01:00
parent 8d5afddf22
commit 1e628bb535

View file

@ -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);
}