Merge branch 'bugfix/bluedroid_ble_adv_length_0_error' into 'master'

bluedroid: fix ble adv length 0 error

See merge request espressif/esp-idf!24496
This commit is contained in:
Chen Jian Hua 2023-07-04 11:00:43 +08:00
commit f71b23e767

View File

@ -431,8 +431,7 @@ esp_err_t esp_ble_gap_config_adv_data_raw(uint8_t *raw_data, uint32_t raw_data_l
ESP_BLUEDROID_STATUS_CHECK(ESP_BLUEDROID_STATUS_ENABLED);
if (raw_data == NULL
|| (raw_data_len <= 0 || raw_data_len > ESP_BLE_ADV_DATA_LEN_MAX)) {
if ((raw_data_len != 0 && raw_data == NULL) || raw_data_len > ESP_BLE_ADV_DATA_LEN_MAX) {
return ESP_ERR_INVALID_ARG;
}