mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-12 07:37:31 -04:00
qcacmn: Validate number of entries in extract_host_mem_req_tlv()
Validate num_mem_reqs should be less than TLV size in extract_host_mem_req_tlv() function. Change-Id: I88ebfc4bfe3abb9b0926990f5f777fc0d62e1fc1 CRs-Fixed: 2347667
This commit is contained in:
parent
324f49155b
commit
4576e298ca
1 changed files with 6 additions and 0 deletions
|
|
@ -8157,6 +8157,12 @@ static host_mem_req *extract_host_mem_req_tlv(wmi_unified_t wmi_handle,
|
|||
return NULL;
|
||||
}
|
||||
|
||||
if (ev->num_mem_reqs > param_buf->num_mem_reqs) {
|
||||
WMI_LOGE("Invalid num_mem_reqs %d:%d",
|
||||
ev->num_mem_reqs, param_buf->num_mem_reqs);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
*num_entries = ev->num_mem_reqs;
|
||||
|
||||
return (host_mem_req *)param_buf->mem_reqs;
|
||||
|
|
|
|||
Loading…
Reference in a new issue