You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by an...@apache.org on 2020/02/06 20:38:09 UTC

[mynewt-nimble] branch master updated: nimble/ll: Fix crash when scanning with privacy enabled

This is an automated email from the ASF dual-hosted git repository.

andk pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-nimble.git


The following commit(s) were added to refs/heads/master by this push:
     new 8a13cfe  nimble/ll: Fix crash when scanning with privacy enabled
8a13cfe is described below

commit 8a13cfe42169d7eaed2d1873d981c99b2efca83f
Author: Andrzej Kaczmarek <an...@codecoup.pl>
AuthorDate: Wed Feb 5 18:29:17 2020 +0100

    nimble/ll: Fix crash when scanning with privacy enabled
---
 nimble/controller/src/ble_ll_scan.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/nimble/controller/src/ble_ll_scan.c b/nimble/controller/src/ble_ll_scan.c
index 3ebd8c2..84747db 100644
--- a/nimble/controller/src/ble_ll_scan.c
+++ b/nimble/controller/src/ble_ll_scan.c
@@ -2405,6 +2405,13 @@ ble_ll_scan_rx_isr_end(struct os_mbuf *rxpdu, uint8_t crcok)
         goto scan_rx_isr_ignore;
     }
 
+    /*
+     * Addresses will be always set in handlers, no need to initialize them. We
+     * only need to initialize rl which may not be always set, depending on how
+     * filtering goes.
+     */
+    addrd.rl = NULL;
+
     switch (pdu_type) {
     case BLE_ADV_PDU_TYPE_ADV_IND:
     case BLE_ADV_PDU_TYPE_ADV_DIRECT_IND: