qcacmn: Fix crash due to corruption in ce_mark_datapath
Use length of service_to_pipe array to loop through services instead of array size. Change-Id: I107203861501ed5ac348979868ac981b5a6cd1ae CRs-Fixed: 2033254
This commit is contained in:

committed by
Sandeep Puligilla

父節點
6cb0fa1c4f
當前提交
c068709444
@@ -597,7 +597,7 @@ static void hif_select_service_to_pipe_map(struct hif_softc *scn,
|
|||||||
static bool ce_mark_datapath(struct CE_state *ce_state)
|
static bool ce_mark_datapath(struct CE_state *ce_state)
|
||||||
{
|
{
|
||||||
struct service_to_pipe *svc_map;
|
struct service_to_pipe *svc_map;
|
||||||
uint32_t map_sz;
|
uint32_t map_sz, map_len;
|
||||||
int i;
|
int i;
|
||||||
bool rc = false;
|
bool rc = false;
|
||||||
|
|
||||||
@@ -605,7 +605,8 @@ static bool ce_mark_datapath(struct CE_state *ce_state)
|
|||||||
hif_select_service_to_pipe_map(ce_state->scn, &svc_map,
|
hif_select_service_to_pipe_map(ce_state->scn, &svc_map,
|
||||||
&map_sz);
|
&map_sz);
|
||||||
|
|
||||||
for (i = 0; i < map_sz; i++) {
|
map_len = map_sz / sizeof(struct service_to_pipe);
|
||||||
|
for (i = 0; i < map_len; i++) {
|
||||||
if ((svc_map[i].pipenum == ce_state->id) &&
|
if ((svc_map[i].pipenum == ce_state->id) &&
|
||||||
((svc_map[i].service_id == HTT_DATA_MSG_SVC) ||
|
((svc_map[i].service_id == HTT_DATA_MSG_SVC) ||
|
||||||
(svc_map[i].service_id == HTT_DATA2_MSG_SVC) ||
|
(svc_map[i].service_id == HTT_DATA2_MSG_SVC) ||
|
||||||
|
Reference in New Issue
Block a user