mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-10 06:09:23 -04:00
qcacld-3.0: Add validation code in __lim_process_roam_scan_offload_req
In function __lim_process_roam_scan_offload_req add validation code to avoid buffer overflow during memcopy. Change-Id: I2ac02e276dd7e4df0a6dffe58181ff538b49ed74 CRs-Fixed: 1082162 (cherry picked from commit 9806f9cfe464fb7ebebbf1a1f27c2b0b39cb1ffd)
This commit is contained in:
parent
941630a0d1
commit
c2bb440175
1 changed files with 6 additions and 3 deletions
|
|
@ -4165,9 +4165,12 @@ static void __lim_process_roam_scan_offload_req(tpAniSirGlobal mac_ctx,
|
|||
if (local_ie_len &&
|
||||
!lim_update_ext_cap_ie(mac_ctx, req_buffer->assoc_ie.addIEdata,
|
||||
local_ie_buf, &local_ie_len)) {
|
||||
req_buffer->assoc_ie.length = local_ie_len;
|
||||
qdf_mem_copy(req_buffer->assoc_ie.addIEdata, local_ie_buf,
|
||||
local_ie_len);
|
||||
if (local_ie_len <=
|
||||
QDF_ARRAY_SIZE(req_buffer->assoc_ie.addIEdata)) {
|
||||
req_buffer->assoc_ie.length = local_ie_len;
|
||||
qdf_mem_copy(req_buffer->assoc_ie.addIEdata,
|
||||
local_ie_buf, local_ie_len);
|
||||
}
|
||||
}
|
||||
qdf_mem_free(local_ie_buf);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue