qcacmn: Add length check for newly generated frame

Add boundary check for the newly generated frame per subelement.
It should not go beyond the original beacon frame length.

Change-Id: I6de5519052a47119ec0a294941244c1b277233fc
CRs-Fixed: 3194793
This commit is contained in:
Adwait Nayak
2022-06-03 00:09:07 +05:30
committed by Madan Koyyalamudi
parent 0fd34e472b
commit 3ebb459d03

View File

@@ -3143,7 +3143,7 @@ static QDF_STATUS util_scan_parse_mbssid(struct wlan_objmgr_pdev *pdev,
new_frame_len = frame_len - ielen + new_ie_len;
if (new_frame_len < 0) {
if (new_frame_len < 0 || new_frame_len > frame_len) {
if (mbssid_info.split_prof_continue) {
qdf_mem_free(split_prof_start);
split_prof_start = NULL;