msm: camera: req_mgr: Fixing condition to check num_links range
Current condition to verify that num_links lies in range, is always false. This change adds fix to condition, while checking num_links range to avoid OOB acccess. CRs-Fixed: 3830586 Change-Id: I6e69cd373c6d15d2133fc6a286b4dde23234a6b3 Signed-off-by: Yash Upadhyay <quic_yupadhya@quicinc.com>
Este commit está contenido en:
@@ -5228,7 +5228,7 @@ int cam_req_mgr_schedule_request_v2(
|
||||
}
|
||||
|
||||
if (sched_req->sync_mode == CAM_REQ_MGR_SYNC_MODE_SYNC) {
|
||||
if ((sched_req->num_links <= 0) &&
|
||||
if ((sched_req->num_links <= 0) ||
|
||||
(sched_req->num_links > MAXIMUM_LINKS_PER_SESSION)) {
|
||||
CAM_ERR(CAM_CRM, "link:0x%x req:%lld invalid num_links:%d",
|
||||
link->link_hdl, sched_req->req_id, sched_req->num_links);
|
||||
|
Referencia en una nueva incidencia
Block a user