https://gitlab.synchro.net/main/sbbs/-/commit/f1366d4c5d4e4ff52ab19b0a
Modified Files:
src/conio/cterm.c cterm_test.c
Log Message:
Ignore NUL (media-fill) inside escape sequences and command strings
Per ECMA-48 §8.3.88, NUL may be freely inserted into or removed from
a data stream without affecting content. Previously NUL inside a
command string (DCS/OSC/APC/PM) would abort the string, and NUL inside
an escape sequence was only ignored by accident (strcat no-op on a NUL-terminated source).
Now NUL is explicitly skipped in both contexts. Inside SOS character
strings, NUL is accumulated as-is (the application's opaque data).
Added 4 tests: NUL in CSI sequence, NUL in OSC, NUL in DCS, NUL in SOS (verifying accumulation via strbuflen check).
Co-Authored-By: Claude Opus 4.6 (1M context) <
noreply@anthropic.com>
---
■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net