mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-12 07:37:31 -04:00
qcacmn: Add check to avoid adf_dp_trace_cb_table over read
The size of adf_dp_trace_cb_table array is 30, possible over read of adf_dp_trace_cb_table array in adf_dp_add_record API. Add index condition check for adf_dp_trace_cb_table to avoid array over read. CRs-Fixed: 1041684 Change-Id: I4f0f9dda239efd404dff3f92b68a45aaf71875ae
This commit is contained in:
parent
1468f997c3
commit
186c3da226
1 changed files with 2 additions and 1 deletions
|
|
@ -1201,7 +1201,8 @@ static void qdf_dp_add_record(enum QDF_DP_TRACE_ID code,
|
|||
rec->pid = (in_interrupt() ? 0 : current->pid);
|
||||
spin_unlock_bh(&l_dp_trace_lock);
|
||||
|
||||
if (g_qdf_dp_trace_data.live_mode || (print == true))
|
||||
if ((g_qdf_dp_trace_data.live_mode || (print == true)) &&
|
||||
(rec->code < QDF_DP_TRACE_MAX))
|
||||
qdf_dp_trace_cb_table[rec->code] (rec, index);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue