summaryrefslogtreecommitdiff
path: root/iwinfo_wext_scan.c
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2015-10-29 10:53:32 +0100
committerJo-Philipp Wich <jow@openwrt.org>2015-10-29 10:53:32 +0100
commit1e628bb5352eeee83562f98afe1d2d211fc038d6 (patch)
treedc35fabe4dd95bac1b28654e0c2028c4267d3656 /iwinfo_wext_scan.c
parent8d5afddf221172c9bb00198b1b67fdbf5deb1b96 (diff)
downloadiwinfo-1e628bb5352eeee83562f98afe1d2d211fc038d6.tar.gz
wext_scan: fix possibly unterminated ifname string
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
Diffstat (limited to 'iwinfo_wext_scan.c')
-rw-r--r--iwinfo_wext_scan.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/iwinfo_wext_scan.c b/iwinfo_wext_scan.c
index a066721..1d7ec16 100644
--- a/iwinfo_wext_scan.c
+++ b/iwinfo_wext_scan.c
@@ -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);
}