From 3d38d1d17eba37b0985dd2857b4539410824a3e6 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Fri, 11 Sep 2015 15:46:49 +0200 Subject: [PATCH] iwinfo: null-terminate country code Signed-off-by: Felix Fietkau --- iwinfo_nl80211.c | 1 + 1 file changed, 1 insertion(+) 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)); -- 2.25.1