nl80211: fix possibly unterminated ifname string
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
This commit is contained in:
parent
89296a5f17
commit
41ae5bd556
1 changed files with 1 additions and 1 deletions
|
@ -604,7 +604,7 @@ static char * nl80211_phy2ifname(const char *ifname)
|
||||||
((ifidx < 0) || (cifidx < ifidx)))
|
((ifidx < 0) || (cifidx < ifidx)))
|
||||||
{
|
{
|
||||||
ifidx = cifidx;
|
ifidx = cifidx;
|
||||||
strncpy(nif, e->d_name, sizeof(nif));
|
strncpy(nif, e->d_name, sizeof(nif) - 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue