From 04fe1b966775452ea989e46d596980184882c762 Mon Sep 17 00:00:00 2001 From: M Hightower <27247790+mhightower83@users.noreply.github.com> Date: Mon, 4 Apr 2022 01:08:14 -0700 Subject: [PATCH] Fix OOM print handling of NULL file pointer (#8527) --- cores/esp8266/heap.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cores/esp8266/heap.cpp b/cores/esp8266/heap.cpp index 63ff49579..67f785c71 100644 --- a/cores/esp8266/heap.cpp +++ b/cores/esp8266/heap.cpp @@ -173,7 +173,7 @@ void IRAM_ATTR print_loc(size_t size, const char* file, int line) DEBUG_HEAP_PRINTF(":oom(%d)@", (int)size); bool inISR = ETS_INTR_WITHINISR(); - if (inISR && (uint32_t)file >= 0x40200000) { + if (NULL == file || (inISR && (uint32_t)file >= 0x40200000)) { DEBUG_HEAP_PRINTF("File: %p", file); } else if (!inISR && (uint32_t)file >= 0x40200000) { char buf[strlen_P(file) + 1];