|
@@ -575,6 +575,11 @@ static int __wlan_hdd_cfg80211_scan(struct wiphy *wiphy,
|
|
|
params.default_ie.len = 0;
|
|
|
/* Store the Scan IE's in Adapter*/
|
|
|
if (request->ie_len) {
|
|
|
+ if (request->ie_len > SIR_MAC_MAX_ADD_IE_LENGTH) {
|
|
|
+ hdd_debug("Invalid ie_len: %zu", request->ie_len);
|
|
|
+ return -EINVAL;
|
|
|
+ }
|
|
|
+
|
|
|
/* save this for future association (join requires this) */
|
|
|
memset(&scan_info->scan_add_ie, 0, sizeof(scan_info->scan_add_ie));
|
|
|
memcpy(scan_info->scan_add_ie.addIEdata, request->ie,
|