diff options
| -rw-r--r-- | core/hdd/src/wlan_hdd_cfg80211.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/core/hdd/src/wlan_hdd_cfg80211.c b/core/hdd/src/wlan_hdd_cfg80211.c index 98b00122ff11..1f34e4cce4f7 100644 --- a/core/hdd/src/wlan_hdd_cfg80211.c +++ b/core/hdd/src/wlan_hdd_cfg80211.c @@ -14974,6 +14974,12 @@ static int __wlan_hdd_cfg80211_testmode(struct wiphy *wiphy, timePeriodSec == 0)) return -EINVAL; + if (buf_len > sizeof(*hb_params)) { + hdd_err("buf_len=%d exceeded hb_params size limit", + buf_len); + return -ERANGE; + } + hb_params = (tSirLPHBReq *) qdf_mem_malloc(sizeof(tSirLPHBReq)); if (NULL == hb_params) { |
