From 581297b4d9b0d92cc1d1e8cb11ec0c1280d782bf Mon Sep 17 00:00:00 2001 From: Om Prakash Tripathi Date: Mon, 26 Mar 2018 14:46:21 +0530 Subject: [PATCH] qcacmn: Fix null pointer dereference in scan Make sure passed pointer is non null before accessing it. Change-Id: I62fd051f13265070954d1e6ae7d9e9ea7efe3ba3 CRs-Fixed: 2212629 --- umac/scan/dispatcher/inc/wlan_scan_utils_api.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/umac/scan/dispatcher/inc/wlan_scan_utils_api.h b/umac/scan/dispatcher/inc/wlan_scan_utils_api.h index cd0563ec5bba..aff016e069f9 100644 --- a/umac/scan/dispatcher/inc/wlan_scan_utils_api.h +++ b/umac/scan/dispatcher/inc/wlan_scan_utils_api.h @@ -529,6 +529,8 @@ util_scan_entry_copy_ie_data(struct scan_cache_entry *scan_entry, /* iebuf can be NULL, ie_len must be a valid pointer. */ QDF_ASSERT(ie_len != NULL); + if (!ie_len) + return QDF_STATUS_E_NULL_VALUE; buff = util_scan_entry_ie_data(scan_entry); buff_len = util_scan_entry_ie_len(scan_entry);