Merge branch 'bugfix/fix_bt_coverity_v5.3' into 'release/v5.3'

bugfix: Fix array compared against 0 in btc_manage.c and the issue of uninitialized pointer reading in coexist_printf (v5.3)

See merge request espressif/esp-idf!42068
This commit is contained in:
Jiang Jiang Jian
2025-10-20 19:24:03 +08:00
2 changed files with 19 additions and 14 deletions
+4 -2
View File
@@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2016-2024 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2016-2025 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@@ -38,13 +38,15 @@ static int lib_printf(const char* tag, const char* format, va_list arg)
if (i > 0) {
ESP_LOGI(tag, "%s", temp);
}
va_end(arg);
return len;
}
int coexist_printf(const char* format, ...)
{
va_list arg;
/* coverity[uninit_use_in_call]
Event uninit_use_in_call: Using uninitialized value arg when calling __builtin_c23_va_start.
False-positive: arg will be initialized in the function va_start() */
va_start(arg, format);
int res = lib_printf("coexist", format, arg);
va_end(arg);