From 190f021ba824cd9acd2430bf0020caa304181acc Mon Sep 17 00:00:00 2001 From: Erhan Kurubas Date: Sat, 30 Nov 2024 15:15:01 +0100 Subject: [PATCH] fix(espcoredump): prevent null pointer dereference in panic reason handling --- components/esp_system/panic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/esp_system/panic.c b/components/esp_system/panic.c index 35f50785e4..ff9043ac31 100644 --- a/components/esp_system/panic.c +++ b/components/esp_system/panic.c @@ -301,7 +301,7 @@ void esp_panic_handler(panic_info_t *info) char *panic_reason_str = NULL; if (info->pseudo_excause) { panic_reason_str = (char *)info->reason; - } else if (g_panic_abort && strlen(g_panic_abort_details)) { + } else if (g_panic_abort) { panic_reason_str = g_panic_abort_details; } if (panic_reason_str) {