Merge branch 'bugfix/ble_enhanced_security_v2_v5.4' into 'release/v5.4'

fix(ble/bluedroid): Fixed potential out-of-bounds memory access when resolve adv data (v5.4)

See merge request espressif/esp-idf!41306
This commit is contained in:
Island
2025-08-20 11:18:22 +08:00
3 changed files with 8 additions and 2 deletions
@@ -204,7 +204,7 @@ void example_exec_write_event_env(prepare_type_env_t *prepare_write_env, esp_ble
static void gap_event_handler(esp_gap_ble_cb_event_t event, esp_ble_gap_cb_param_t *param)
{
switch (event) {
#ifdef CONFIG_SET_RAW_ADV_DATA
#ifdef CONFIG_EXAMPLE_SET_RAW_ADV_DATA
case ESP_GAP_BLE_ADV_DATA_RAW_SET_COMPLETE_EVT:
adv_config_done &= (~adv_config_flag);
if (adv_config_done==0){
@@ -26,7 +26,6 @@ Let’s start by taking a look at the included headers in the [gatts_table_creat
#include "esp_gatts_api.h"
#include "esp_bt_defs.h"
#include "esp_bt_main.h"
#include "esp_bt_main.h"
#include “gatts_table_creat_demo.h"
```
These includes are required for the *FreeRTOS* and underlying system components to run, including logging functionality and a library to store data in non-volatile flash memory. We are interested in ``bt.h``, ``esp_bt_main.h``, ``esp_gap_ble_api.h`` and ``esp_gatts_api.h`` which expose the BLE APIs required to implement this example.