From: Jo-Philipp Wich Date: Thu, 29 Oct 2015 09:53:56 +0000 (+0100) Subject: nl80211: fix possibly unterminated ifname string X-Git-Url: http://git.openwrt.org/?p=project%2Fiwinfo.git;a=commitdiff_plain;h=41ae5bd556c5e07c9a0a51ef84a2aaa204a96e73 nl80211: fix possibly unterminated ifname string Signed-off-by: Jo-Philipp Wich --- diff --git a/iwinfo_nl80211.c b/iwinfo_nl80211.c index a08d580..1a1fc69 100644 --- a/iwinfo_nl80211.c +++ b/iwinfo_nl80211.c @@ -604,7 +604,7 @@ static char * nl80211_phy2ifname(const char *ifname) ((ifidx < 0) || (cifidx < ifidx))) { ifidx = cifidx; - strncpy(nif, e->d_name, sizeof(nif)); + strncpy(nif, e->d_name, sizeof(nif) - 1); } } }