https://gitlab.synchro.net/main/sbbs/-/commit/4f775730ab376980e6cde57c
Modified Files:
src/sbbs3/ansi_parser_test.cpp atcodes.cpp putmsg.cpp termaudio_cache.cpp
Log Message:
Emit pass-through control sequences from the source, not the parser copy
putmsg() re-emitted a control sequence to the client by writing ANSI_Parser::ansi_sequence, which is now capped at 1KB. A sixel image or
a font-loading DCS larger than that in a display file or a message was
sent truncated, without its terminator, leaving the client inside a
control string and swallowing everything that followed until some
unrelated terminator appeared. Nothing was logged, because the path
reaching that code is a completed sequence rather than a broken one.
The sequence is now written from the caller's own buffer, recording the
offset where it began. That is independent of the cap and avoids a copy.
Also from the same review:
The C;L query is issued with output-rate emulation suspended. It was
paced by the emulated rate like any other output, so on a rate-limited
session the reply missed its timeout and the client cache was recorded
empty for the rest of the session, making every sound re-upload.
Reading an APC reply no longer clears a pending abort. clearabort() also
zeroes the line counter, so a user who pressed Ctrl-C during a display
file had it swallowed and the pause counter reset.
The size cap is compared in off_t. Truncating to uint32_t let a file of
4GiB or more pass the check and then be read and base64-encoded whole.
@MUSICOFF: clamps its fade argument. A negative value became a fade of
about fifty days, so the code that stops the music did not.
The per-path warning list is bounded. @-codes are reachable from message
text on a sub-board whose n_pmode clears P_NOATCODES, so a single post
naming many distinct missing files could otherwise grow it without limit.
Reading an APC reply also has an overall deadline rather than only a
per-byte timeout, and the line-buffer suspension around an upload is
saved and restored rather than assumed.
Co-Authored-By: Claude Opus 5 (1M context) <
noreply@anthropic.com>
---
■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net