From: Christian Lamparter Date: Wed, 17 Aug 2011 11:15:06 +0000 (+0200) Subject: carl9170 firmware: add missing out-of-bound check in WoWLAN code X-Git-Tag: 1.9.5~39 X-Git-Url: https://jxself.org/git/?a=commitdiff_plain;h=c88fe03d01c3b4120fc13e907c3e49ac97887dba;p=carl9170fw.git carl9170 firmware: add missing out-of-bound check in WoWLAN code 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 --- 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; }