From 1e628bb5352eeee83562f98afe1d2d211fc038d6 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Thu, 29 Oct 2015 10:53:32 +0100 Subject: [PATCH] wext_scan: fix possibly unterminated ifname string Signed-off-by: Jo-Philipp Wich --- iwinfo_wext_scan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); }