From: Felix Fietkau Date: Fri, 11 Sep 2015 13:46:49 +0000 (+0200) Subject: iwinfo: null-terminate country code X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=3d38d1d17eba37b0985dd2857b4539410824a3e6;p=oweals%2Fiwinfo.git iwinfo: null-terminate country code Signed-off-by: Felix Fietkau --- diff --git a/iwinfo_nl80211.c b/iwinfo_nl80211.c index 55bfd0f..7aaae6b 100644 --- a/iwinfo_nl80211.c +++ b/iwinfo_nl80211.c @@ -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));