From c88fe03d01c3b4120fc13e907c3e49ac97887dba Mon Sep 17 00:00:00 2001 From: Christian Lamparter Date: Wed, 17 Aug 2011 13:15:06 +0200 Subject: [PATCH] carl9170 firmware: add missing out-of-bound check in WoWLAN code MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit src/wlan.c: In function ‘wlan_rx_wol_probe_ssid’: src/wlan.c:830:30: error: variable ‘end’ set but not used Signed-off-by: Christian Lamparter --- carlfw/src/wlan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/carlfw/src/wlan.c b/carlfw/src/wlan.c index 50b1f2b..1b89536 100644 --- a/carlfw/src/wlan.c +++ b/carlfw/src/wlan.c @@ -845,7 +845,7 @@ static bool wlan_rx_wol_probe_ssid(struct ieee80211_hdr *hdr, unsigned int len) */ data = (u8 *)((struct ieee80211_mgmt *)hdr)->u.probe_req.variable; for (i = 0; i < (unsigned int)(probe_req.ssid_len + 1); i++) { - if (scan[i] != data[i]) + if (data > end || scan[i] != data[i]) return false; } -- 2.31.1