From 2c7cff8715dc9ae71297138abff374a44a2b2cc1 Mon Sep 17 00:00:00 2001 From: Rahul Gusain Date: Thu, 19 Nov 2020 16:56:30 +0800 Subject: [PATCH] qcacmn: Fix buffer overflow written in the dp_soc_interrupt_detach Use sizeof instead of REG_BAND_UNKNOWN to fix buffer overflow written in the dp_soc_interrupt_detach. Change-Id: Iffad59346c487e34632f1c60b2c88e635f6e83a0 CRs-Fixed: 2822433 --- dp/wifi3.0/dp_main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dp/wifi3.0/dp_main.c b/dp/wifi3.0/dp_main.c index a24ee6735250..335d4232638e 100644 --- a/dp/wifi3.0/dp_main.c +++ b/dp/wifi3.0/dp_main.c @@ -2691,7 +2691,8 @@ static void dp_soc_interrupt_detach(struct cdp_soc_t *txrx_soc) } qdf_mem_set(&soc->mon_intr_id_lmac_map, - REG_BAND_UNKNOWN * sizeof(int), DP_MON_INVALID_LMAC_ID); + sizeof(soc->mon_intr_id_lmac_map), + DP_MON_INVALID_LMAC_ID); } #define AVG_MAX_MPDUS_PER_TID 128