aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHauke Mehrtens <hauke@openwrt.org>2014-07-02 21:43:17 +0000
committerHauke Mehrtens <hauke@openwrt.org>2014-07-02 21:43:17 +0000
commitf6523f58d9a2b1ee2baad8f9d0f18963c3b2d9a9 (patch)
tree7ab1e84b82204e0bdeb16e1d6b6b46cc3a8b8cd7
parentfbd1aa64c4656fe004150456b922a0c35d757b8c (diff)
downloadupstream-f6523f58d9a2b1ee2baad8f9d0f18963c3b2d9a9.tar.gz
upstream-f6523f58d9a2b1ee2baad8f9d0f18963c3b2d9a9.tar.bz2
upstream-f6523f58d9a2b1ee2baad8f9d0f18963c3b2d9a9.zip
iwinfo: fix string format for country code
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@41485 3c298f89-4303-0410-b956-a3cf2f4a3e73
-rw-r--r--package/network/utils/iwinfo/src/iwinfo_wl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/package/network/utils/iwinfo/src/iwinfo_wl.c b/package/network/utils/iwinfo/src/iwinfo_wl.c
index 0b3b4bd8a2..b626b285bb 100644
--- a/package/network/utils/iwinfo/src/iwinfo_wl.c
+++ b/package/network/utils/iwinfo/src/iwinfo_wl.c
@@ -565,7 +565,7 @@ static int wl_get_countrylist(const char *ifname, char *buf, int *len)
{
for (i = 0, count = 0; i < cl->count; i++, c++)
{
- sprintf(c->ccode, &cl->country_abbrev[i * WLC_CNTRY_BUF_SZ]);
+ snprintf(c->ccode, sizeof(c->ccode), "%s", &cl->country_abbrev[i * WLC_CNTRY_BUF_SZ]);
c->iso3166 = c->ccode[0] * 256 + c->ccode[1];
/* IL0 -> World */