From 05dea39f6dcee071b4de3ea90e775ad64c19b406 Mon Sep 17 00:00:00 2001 From: Manikandaraja Venkatachalapathy Date: Wed, 22 Oct 2014 21:50:34 -0700 Subject: qcacld: WMA: Fix allocation length size in event handlers Fix allocation length size in nan and stats response handlers to avoid data corruption Change-Id: Ia23a1f1750ba40ccdd64fd40f9ae2faceb028ec0 CRs-Fixed: 744533 --- CORE/MAC/inc/sirApi.h | 2 +- CORE/SERVICES/WMA/wma.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CORE/MAC/inc/sirApi.h b/CORE/MAC/inc/sirApi.h index dd27b7f46be8..ac24bcb7de6e 100644 --- a/CORE/MAC/inc/sirApi.h +++ b/CORE/MAC/inc/sirApi.h @@ -4744,7 +4744,7 @@ typedef struct #ifdef WLAN_FEATURE_NAN typedef struct { - tANI_U16 event_data_len; + tANI_U32 event_data_len; tANI_U8 event_data[]; } tSirNanEvent, *tpSirNanEvent; #endif diff --git a/CORE/SERVICES/WMA/wma.c b/CORE/SERVICES/WMA/wma.c index 388431dbd6ce..debf7eabfb68 100644 --- a/CORE/SERVICES/WMA/wma.c +++ b/CORE/SERVICES/WMA/wma.c @@ -4400,7 +4400,7 @@ static int wma_nan_rsp_event_handler(void *handle, u_int8_t *event_buf, VOS_STATUS status; vos_msg_t vos_msg; u_int8_t *buf_ptr; - u_int8_t alloc_len; + u_int32_t alloc_len; /* * This is how received event_buf looks like @@ -4992,7 +4992,7 @@ static int wma_stats_ext_event_handler(void *handle, u_int8_t *event_buf, VOS_STATUS status; vos_msg_t vos_msg; u_int8_t *buf_ptr; - u_int8_t alloc_len; + u_int32_t alloc_len; WMA_LOGD("%s: Posting stats ext event to SME", __func__); -- cgit v1.2.3