From 89e7090c59a0dd2fa1a556f83dbf7dee81f9df68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krzysztof=20Kopy=C5=9Bci=C5=84ski?= Date: Wed, 27 Mar 2024 08:46:43 +0100 Subject: [PATCH] controller/ble_ll_sync.c: acad_len potentially uninitialised acad_len in ble_ll_sync_rx_pkt_in is filled in ble_ll_sync_parse_ext_hdr and later accessed in ble_ll_sync_check_acad. There is a possibility that extended advertising header is missing data containing acad, and it will not get filled, leaving it uninitialised. --- nimble/controller/src/ble_ll_sync.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nimble/controller/src/ble_ll_sync.c b/nimble/controller/src/ble_ll_sync.c index 31c8ec04d..d15f1df00 100644 --- a/nimble/controller/src/ble_ll_sync.c +++ b/nimble/controller/src/ble_ll_sync.c @@ -1136,7 +1136,7 @@ ble_ll_sync_rx_pkt_in(struct os_mbuf *rxpdu, struct ble_mbuf_hdr *hdr) int8_t tx_power = 127; /* defaults to not available */ uint8_t *aux = NULL; uint8_t *acad = NULL; - uint8_t acad_len; + uint8_t acad_len = 0; const uint8_t *biginfo = NULL; uint8_t biginfo_len = 0; int datalen;