Преглед на файлове

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
Varun Reddy Yeturu преди 7 години
родител
ревизия
27f023ad59
променени са 1 файла, в които са добавени 2 реда и са изтрити 2 реда
  1. 2 2
      core/src/wlan_p2p_off_chan_tx.c

+ 2 - 2
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) {