iwinfo: zero out ccode buffer since library doesn't
authorDenis Osvald <denis.osvald@sartura.hr>
Thu, 2 Jun 2016 15:06:30 +0000 (17:06 +0200)
committerJo-Philipp Wich <jo@mein.io>
Sun, 5 Jun 2016 14:05:23 +0000 (16:05 +0200)
commitf8174eacef9b687a83231e58fdd1e53492e3ca84
treec379ab22f81951ad8f477ba84e1d0bf97c2600b2
parent73aea9b8b621a1ce034bc6ee00c9d058a40c8a3d
iwinfo: zero out ccode buffer since library doesn't

Making an ubus call iwinfo countrylist '{"device":"radio0"}' will result
in some entries having garbage uninitialized stack bytes in the "code"
fields.

With this patch we zero-initialize the buffer that libiwinfo writes to,
making it NUL-terminated so that behavior doesn't happen anymore.

Signed-off-by: Denis Osvald <denis.osvald@sartura.hr>
iwinfo.c