Skip to content

Commit ce9563d

Browse files
committed
Merge branch 'fix/argtable3-coverity-findings' into 'master'
fix(console): Add input validation in arg_utils.c functions Closes IDF-13986 and IDF-13987 See merge request espressif/esp-idf!41736
2 parents 649741f + dea3fd2 commit ce9563d

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

components/console/argtable3/arg_utils.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,21 @@ static void panic(const char* fmt, ...);
5050
static arg_panicfn* s_panic = panic;
5151

5252
void dbg_printf(const char* fmt, ...) {
53+
if (fmt == NULL) {
54+
return;
55+
}
56+
5357
va_list args = {0};
5458
va_start(args, fmt);
5559
vfprintf(stderr, fmt, args);
5660
va_end(args);
5761
}
5862

5963
static void panic(const char* fmt, ...) {
64+
if (fmt == NULL) {
65+
return;
66+
}
67+
6068
va_list args = {0};
6169
char* s;
6270

0 commit comments

Comments
 (0)