mirror of
https://github.com/espressif/esp-idf.git
synced 2026-05-28 16:46:31 +03:00
fix(console): Add input validation in arg_utils.c functions
This commit is contained in:
@@ -50,6 +50,10 @@ static void panic(const char* fmt, ...);
|
||||
static arg_panicfn* s_panic = panic;
|
||||
|
||||
void dbg_printf(const char* fmt, ...) {
|
||||
if (fmt == NULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
va_list args = {0};
|
||||
va_start(args, fmt);
|
||||
vfprintf(stderr, fmt, args);
|
||||
@@ -57,6 +61,10 @@ void dbg_printf(const char* fmt, ...) {
|
||||
}
|
||||
|
||||
static void panic(const char* fmt, ...) {
|
||||
if (fmt == NULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
va_list args = {0};
|
||||
char* s;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user