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