https://gitlab.synchro.net/main/sbbs/-/commit/c199c3caaedd6913f4fc3195
Modified Files:
src/sbbs3/ansi_terminal.cpp terminal.cpp
Log Message:
sbbs3 terminal: fix c_escape_str() maxlen off-by-one in debug logs
c_escape_str()'s maxlen excludes the NUL terminator and requires the
caller's buffer to be maxlen+1 bytes. Three debug-log call sites in
the Terminal and ANSI_Terminal classes passed sizeof(buf), which can
overflow the buffer by one byte when the pass-through branch fills
the last slot.
terminal.cpp's call site is currently inside #if 0; the two in ansi_terminal.cpp are _DEBUG-only. Pass sizeof(buf)-1 to match the
existing answer.cpp / ini_file.c convention.
Co-Authored-By: Claude Opus 4.7 (1M context) <
noreply@anthropic.com>
---
þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net