|
@@ -2332,8 +2332,9 @@ static void hdd_send_re_assoc_event(struct net_device *dev,
|
|
|
goto done;
|
|
|
}
|
|
|
|
|
|
- if (roam_info->nAssocRspLength == 0) {
|
|
|
- hdd_err("Assoc rsp length is 0");
|
|
|
+ if (roam_info->nAssocRspLength < FT_ASSOC_RSP_IES_OFFSET) {
|
|
|
+ hdd_err("Invalid assoc rsp length %d",
|
|
|
+ roam_info->nAssocRspLength);
|
|
|
goto done;
|
|
|
}
|
|
|
|
|
@@ -2363,6 +2364,10 @@ static void hdd_send_re_assoc_event(struct net_device *dev,
|
|
|
|
|
|
/* Send the Assoc Resp, the supplicant needs this for initial Auth */
|
|
|
len = roam_info->nAssocRspLength - FT_ASSOC_RSP_IES_OFFSET;
|
|
|
+ if (len > IW_GENERIC_IE_MAX) {
|
|
|
+ hdd_err("Invalid Assoc resp length %d", len);
|
|
|
+ goto done;
|
|
|
+ }
|
|
|
rsp_rsn_lemgth = len;
|
|
|
qdf_mem_copy(rsp_rsn_ie, assoc_rsp, len);
|
|
|
qdf_mem_zero(rsp_rsn_ie + len, IW_GENERIC_IE_MAX - len);
|