mirror of
https://github.com/esp8266/Arduino.git
synced 2025-04-21 10:26:06 +03:00
Correct stack string buffer length. (#7488)
Co-authored-by: Earle F. Philhower, III <earlephilhower@yahoo.com>
This commit is contained in:
parent
0e12906950
commit
e815b9219b
@ -164,7 +164,7 @@ void ICACHE_RAM_ATTR print_loc(size_t size, const char* file, int line)
|
||||
if (inISR && (uint32_t)file >= 0x40200000) {
|
||||
DEBUG_HEAP_PRINTF("File: %p", file);
|
||||
} else if (!inISR && (uint32_t)file >= 0x40200000) {
|
||||
char buf[ets_strlen(file)] __attribute__ ((aligned(4)));
|
||||
char buf[ets_strlen(file) + 1] __attribute__((aligned(4)));
|
||||
ets_strcpy(buf, file);
|
||||
DEBUG_HEAP_PRINTF(buf);
|
||||
} else {
|
||||
|
@ -206,7 +206,7 @@ int ICACHE_FLASH_ATTR umm_info_safe_printf_P(const char *fmt, ...) {
|
||||
the PROGMEM address must be word (4 bytes) aligned. The destination
|
||||
address for ets_memcpy must also be word-aligned.
|
||||
*/
|
||||
char ram_buf[ets_strlen(fmt)] __attribute__ ((aligned(4)));
|
||||
char ram_buf[ets_strlen(fmt) + 1] __attribute__((aligned(4)));
|
||||
ets_strcpy(ram_buf, fmt);
|
||||
va_list argPtr;
|
||||
va_start(argPtr, fmt);
|
||||
|
Loading…
x
Reference in New Issue
Block a user