aboutsummaryrefslogtreecommitdiffstats
path: root/package/iwinfo/src/iwinfo_wl.c
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2012-02-22 13:56:06 +0000
committerJo-Philipp Wich <jow@openwrt.org>2012-02-22 13:56:06 +0000
commit27917341791ae49830f79016be20f3369e0142d7 (patch)
treeb4b6b9834ba1c7271a979105a1286c80f4f3500f /package/iwinfo/src/iwinfo_wl.c
parentc86c74b1e4fc90112b9ffb500e34117e1bbb42ab (diff)
downloadupstream-27917341791ae49830f79016be20f3369e0142d7.tar.gz
upstream-27917341791ae49830f79016be20f3369e0142d7.tar.bz2
upstream-27917341791ae49830f79016be20f3369e0142d7.zip
iwinfo: fix array size mismatch after r30684
SVN-Revision: 30685
Diffstat (limited to 'package/iwinfo/src/iwinfo_wl.c')
-rw-r--r--package/iwinfo/src/iwinfo_wl.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/package/iwinfo/src/iwinfo_wl.c b/package/iwinfo/src/iwinfo_wl.c
index 3acfff4aad..038361f3e8 100644
--- a/package/iwinfo/src/iwinfo_wl.c
+++ b/package/iwinfo/src/iwinfo_wl.c
@@ -489,18 +489,18 @@ int wl_get_assoclist(const char *ifname, char *buf, int *len)
int wl_get_txpwrlist(const char *ifname, char *buf, int *len)
{
struct iwinfo_txpwrlist_entry entry;
- uint8_t dbm[8] = { 0, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24 };
- uint8_t mw[8] = { 1, 3, 6, 10, 15, 25, 39, 63, 100, 158, 251 };
+ uint8_t dbm[11] = { 0, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24 };
+ uint8_t mw[11] = { 1, 3, 6, 10, 15, 25, 39, 63, 100, 158, 251 };
int i;
- for (i = 0; i < 8; i++)
+ for (i = 0; i < 11; i++)
{
entry.dbm = dbm[i];
entry.mw = mw[i];
memcpy(&buf[i*sizeof(entry)], &entry, sizeof(entry));
}
- *len = 8 * sizeof(entry);
+ *len = 11 * sizeof(entry);
return 0;
}