nl80211: fix possibly unterminated ifname string

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
This commit is contained in:
Jo-Philipp Wich 2015-10-29 10:53:56 +01:00
parent 89296a5f17
commit 41ae5bd556

View file

@ -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);
}
}
}