From 27f023ad5942794cf700d596d68b21e80c36457a Mon Sep 17 00:00:00 2001 From: Varun Reddy Yeturu Date: Thu, 4 Jan 2018 16:25:06 -0800 Subject: [PATCH] qcacmn: Fix potential NULL dereference in P2P 1) Check for validity of ps_config before dereferencing. 2) Check for validity of lo_start before dereferencing. 3) Initialize tmp_p2p_ie before using it. Change-Id: I4cd5bcb025e63d727e5535921a4e4121d618ee36 CRs-Fixed: 2160760 --- core/src/wlan_p2p_off_chan_tx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/wlan_p2p_off_chan_tx.c b/core/src/wlan_p2p_off_chan_tx.c index 51c57f796ed7..2a7bf48a9d9d 100644 --- a/core/src/wlan_p2p_off_chan_tx.c +++ b/core/src/wlan_p2p_off_chan_tx.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 The Linux Foundation. All rights reserved. + * Copyright (c) 2017-2018 The Linux Foundation. All rights reserved. * * Permission to use, copy, modify, and/or distribute this software for * any purpose with or without fee is hereby granted, provided that the @@ -142,7 +142,7 @@ static const uint8_t *p2p_get_p2pie_from_probe_rsp( { const uint8_t *ie; const uint8_t *p2p_ie; - const uint8_t *tmp_p2p_ie; + const uint8_t *tmp_p2p_ie = NULL; uint16_t ie_len; if (tx_ctx->buf_len <= PROBE_RSP_IE_OFFSET) {