wext_scan: fix possibly unterminated ifname string
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
This commit is contained in:
parent
8d5afddf22
commit
1e628bb535
1 changed files with 1 additions and 1 deletions
|
@ -25,7 +25,7 @@
|
||||||
|
|
||||||
static int wext_ioctl(const char *ifname, int cmd, struct iwreq *wrq)
|
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);
|
return iwinfo_ioctl(cmd, wrq);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue