From 159005e91a64b95f200e92397674fea8647cd4d3 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Fri, 13 Mar 2026 17:59:35 -1000 Subject: [PATCH] [esp32] Use 512-byte stack buffer for early/constrained log formatting --- esphome/core/log.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/esphome/core/log.cpp b/esphome/core/log.cpp index c61b64b0a2f..caadccae871 100644 --- a/esphome/core/log.cpp +++ b/esphome/core/log.cpp @@ -113,7 +113,7 @@ static void __attribute__((noinline)) esp_log_format_early_(esp_log_msg_t *messa static const char lvl[] = {'\0', 'E', 'W', 'I', 'D', 'V'}; // Format into stack buffer and output atomically via esp_rom_printf // to prevent interleaving. Can't use fwrite (newlib locks not initialized). - char buf[256]; + char buf[512]; int pos = 0; uint8_t level = message->config.opts.log_level; if (level > 0 && level < sizeof(lvl)) {