fix(core): increasing the buffer length in "dbg_console_vprintf()" function from 80B to 160B. It will improve the debug messages' usage.
What changed, and why it matters
This commit simply doubles the size of a temporary text buffer used for debug-only console messages in the Trezor firmware. There is no security issue here: the code already safely limits how much data is written, and the change only makes longer debug messages fit without being cut off.
No action required. Treat as a routine debug-output improvement.
Security signals we found
No strong security signals were identified.
Evidence from the diff
In core/embed/sys/dbg/dbg_console.c, the local stack buffer in dbg_console_vprintf() is increased from 80 to 160 bytes. The function continues to call mini_vsnprintf() with sizeof(temp) and strnlen(temp, sizeof(temp)), so the buffer is still bounded. This is a usability/debug-output quality change, not a memory-safety or security fix.
Changed components
core/embed/sys/dbg/dbg_console.cInspect captured patch +1 / −1
diff --git a/core/embed/sys/dbg/dbg_console.c b/core/embed/sys/dbg/dbg_console.c
index 9289162b4..ceefb0fe9 100644
--- a/core/embed/sys/dbg/dbg_console.c
+++ b/core/embed/sys/dbg/dbg_console.c
@@ -23,7 +23,7 @@
#include <sys/dbg_console.h>
void dbg_console_vprintf(const char *fmt, va_list args) {
- char temp[80];
+ char temp[160];
mini_vsnprintf(temp, sizeof(temp), fmt, args);
dbg_console_write(temp, strnlen(temp, sizeof(temp)));
}
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.