szn

Bug 270 — Array Write Without Bounds Check in InputReader.feedCsi

270. Array Write Without Bounds Check in InputReader.feedCsi

File: src/tty/tty_key.zig:113–139 Severity: MEDIUM Status: ✅ FIXED — added if (rd.pos >= rd.buf.len) check before the final byte write at line 136, matching the existing checks for parameter bytes. Unit test added.

When terminating a sequence, rd.buf[rd.pos] = byte is executed. If rd.pos equals rd.buf.len (256), the write occurs past the buffer boundary.

Impact: Potential panic/crash on malformed escape sequences.