iwinfo: null-terminate country code
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
This commit is contained in:
parent
16597a70bc
commit
3d38d1d17e
1 changed files with 1 additions and 0 deletions
|
@ -2480,6 +2480,7 @@ static int nl80211_get_countrylist(const char *ifname, char *buf, int *len)
|
|||
e->iso3166 = l->iso3166;
|
||||
e->ccode[0] = (l->iso3166 / 256);
|
||||
e->ccode[1] = (l->iso3166 % 256);
|
||||
e->ccode[2] = 0;
|
||||
}
|
||||
|
||||
*len = (count * sizeof(struct iwinfo_country_entry));
|
||||
|
|
Loading…
Add table
Reference in a new issue