mirror of
https://github.com/espressif/esp-nimble.git
synced 2026-10-27 15:53:35 +00:00
nimble/hci: Fix passing uninitialized data
In ble_hs_hci_evt_le_dir_adv_rpt function desc.length_data was passed uninitialized to ble_gap_rx_adv_report. While it shouldn't be access if desc.data is NULL it is better to just initialize it to 0. X-Original-Commit: 4e7d583466b6bd3917e984eb47d8b06f2e20c353
This commit is contained in:
@@ -434,6 +434,7 @@ ble_hs_hci_evt_le_dir_adv_rpt(uint8_t subevent, uint8_t *data, int len)
|
||||
|
||||
/* Data fields not present in a direct advertising report. */
|
||||
desc.data = NULL;
|
||||
desc.length_data = 0;
|
||||
|
||||
for (i = 0; i < num_reports; i++) {
|
||||
suboff = 0;
|
||||
|
||||
Reference in New Issue
Block a user