From 59992443bc0bc57b9601940824cbe1f285be07b9 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Sat, 5 Feb 2011 18:20:48 +0000 Subject: libiwinfo: fix integer overflow in dbm to mw conversion, also allow odd dbm numbers --- contrib/package/iwinfo/src/iwinfo_nl80211.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'contrib/package/iwinfo/src/iwinfo_nl80211.c') diff --git a/contrib/package/iwinfo/src/iwinfo_nl80211.c b/contrib/package/iwinfo/src/iwinfo_nl80211.c index fa714e9063..0f57d37f1d 100644 --- a/contrib/package/iwinfo/src/iwinfo_nl80211.c +++ b/contrib/package/iwinfo/src/iwinfo_nl80211.c @@ -1170,7 +1170,7 @@ int nl80211_get_txpwrlist(const char *ifname, char *buf, int *len) { for( dbm_cur = 0, dbm_cnt = 0; dbm_cur < dbm_max; - dbm_cur += 2, dbm_cnt++ ) + dbm_cur++, dbm_cnt++ ) { entry.dbm = dbm_cur; entry.mw = iwinfo_dbm2mw(dbm_cur); -- cgit v1.2.3