out_buf / command_buf unbounded growth with a non-reading clientout_buf / command_buf unbounded growth with a non-reading clientFile: src/server/server.zig:2212–2234, src/server/server.zig:1219–1231
Severity: LOW
Status: ✅ FIXED — appendClientOut self-heals on overflow instead of silently dropping or truncating the client’s pending output: when dc.out_buf.items.len + data.len > MAX_OUT_BUF, it first retries flushDisplayClient (a transient EAGAIN may have cleared), and if the buffer is still over the cap it resets dc.out_buf and dc.last_cells (dropping the stalled backlog and resyncing the diff state) and returns false. The next full renderToDisplayClient then repaints a coherent screen rather than a corrupt partial packet. (appendCommandChar was already bounded at MAX_COMMAND_BUF; its cap is covered by the existing command-buffer regression test.) Regression test (src/status_click_test.zig): a non-reading display client whose out_buf is filled past MAX_OUT_BUF causes appendClientOut to return false with an empty buffer afterward.
queueToClient and sendRequestCellSize append to dc.out_buf with no cap; a client that stops reading but keeps issuing commands grows it without bound (slow-loris). command_buf likewise has no cap while in command mode. The per-frame out_buf replacement path is bounded; only the queue append paths are not.