From 815ea7d95b68cddb1a5d6c49466bc6700d8a32d3 Mon Sep 17 00:00:00 2001 From: M Hightower <27247790+mhightower83@users.noreply.github.com> Date: Sat, 2 Apr 2022 08:18:45 -0700 Subject: [PATCH] Fix OOM print handling of NULL file pointer --- 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 63ff49579f..67f785c712 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];