From 738581ae50f3a4a6ae13f2b013a59442d3a8a57c Mon Sep 17 00:00:00 2001 From: Arif Hussain Date: Mon, 8 Oct 2018 13:58:46 -0700 Subject: [PATCH] qcacmn: Fix null pointer dereference in wifi_pos_oem_rsp_handler() Add validation code to make sure wifi_pos_send_rsp function pointer is not null. Change-Id: I6761f5065b1a49855afac2691523c41bcf383b2b CRs-Fixed: 2329346 --- umac/wifi_pos/src/wifi_pos_main.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/umac/wifi_pos/src/wifi_pos_main.c b/umac/wifi_pos/src/wifi_pos_main.c index 8553eb3bf9fa..7bc766afface 100644 --- a/umac/wifi_pos/src/wifi_pos_main.c +++ b/umac/wifi_pos/src/wifi_pos_main.c @@ -581,6 +581,11 @@ int wifi_pos_oem_rsp_handler(struct wlan_objmgr_psoc *psoc, return -EINVAL; } + if (!wifi_pos_send_rsp) { + wifi_pos_err("invalid response handler"); + return -EINVAL; + } + wifi_pos_debug("oem data rsp, len: %d to pid: %d", len, app_pid); if (oem_rsp->rsp_len_2 + oem_rsp->dma_len) {