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:
parent
fbedcc1b2f
commit
04fe1b9667
@ -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];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user