1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-04-19 23:22:16 +03:00

Fix OOM print handling of NULL file pointer (#8527)

This commit is contained in:
M Hightower 2022-04-04 01:08:14 -07:00 committed by GitHub
parent fbedcc1b2f
commit 04fe1b9667
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -173,7 +173,7 @@ void IRAM_ATTR print_loc(size_t size, const char* file, int line)
DEBUG_HEAP_PRINTF(":oom(%d)@", (int)size); DEBUG_HEAP_PRINTF(":oom(%d)@", (int)size);
bool inISR = ETS_INTR_WITHINISR(); 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); DEBUG_HEAP_PRINTF("File: %p", file);
} else if (!inISR && (uint32_t)file >= 0x40200000) { } else if (!inISR && (uint32_t)file >= 0x40200000) {
char buf[strlen_P(file) + 1]; char buf[strlen_P(file) + 1];