Skip to content

Commit 5d3af16

Browse files
committed
backport #7488
1 parent 4ac1608 commit 5d3af16

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

cores/esp8266/heap.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ void ICACHE_RAM_ATTR print_loc(size_t size, const char* file, int line)
164164
if (inISR && (uint32_t)file >= 0x40200000) {
165165
DEBUG_HEAP_PRINTF("File: %p", file);
166166
} else if (!inISR && (uint32_t)file >= 0x40200000) {
167-
char buf[ets_strlen(file)] __attribute__ ((aligned(4)));
167+
char buf[ets_strlen(file) + 1] __attribute__((aligned(4)));
168168
ets_strcpy(buf, file);
169169
DEBUG_HEAP_PRINTF(buf);
170170
} else {

cores/esp8266/umm_malloc/umm_local.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ int ICACHE_FLASH_ATTR umm_info_safe_printf_P(const char *fmt, ...) {
206206
the PROGMEM address must be word (4 bytes) aligned. The destination
207207
address for ets_memcpy must also be word-aligned.
208208
*/
209-
char ram_buf[ets_strlen(fmt)] __attribute__ ((aligned(4)));
209+
char ram_buf[ets_strlen(fmt) + 1] __attribute__((aligned(4)));
210210
ets_strcpy(ram_buf, fmt);
211211
va_list argPtr;
212212
va_start(argPtr, fmt);

0 commit comments

Comments
 (0)