qcacmn: Fix wrap-around condition check in DIAG_RX_EVENT_RECORD
Diag_log_max_entry should be used to determine wrap around condition in DIAG_RX_EVENT_RECORD. Using incorrect max value results in invalid access and memory corruption. Fix DIAG_RX_EVENT_RECORD to use diag_log max entry instead of mgmt_max entry. Change-Id: Icae3ce843b1fd76e15139fae1a867448ad032cf8 CRs-Fixed: 2488783
This commit is contained in:

committed by
nshrivas

parent
93f7e1be90
commit
c59f7dc66e
@@ -568,7 +568,7 @@ wmi_diag_rx_event_log_buffer[WMI_DIAG_RX_EVENT_DEBUG_MAX_ENTRY];
|
||||
} while (0);
|
||||
|
||||
#define WMI_DIAG_RX_EVENT_RECORD(h, a, b) do { \
|
||||
if (wmi_mgmt_log_max_entry <= \
|
||||
if (wmi_diag_log_max_entry <= \
|
||||
*(h->log_info.wmi_diag_event_log_buf_info.p_buf_tail_idx))\
|
||||
*(h->log_info.wmi_diag_event_log_buf_info.p_buf_tail_idx) = 0;\
|
||||
((struct wmi_event_debug *)h->log_info.wmi_diag_event_log_buf_info.buf)\
|
||||
|
Reference in New Issue
Block a user