szn

Bug 60 — renderStatusBar — overflows rendering buffer when many windows with long names

60. renderStatusBar — overflows rendering buffer when many windows with long names

File: src/server/render.zig:327–359 Severity: LOW Status: ✅ FIXED — Rewrote renderStatusBar to write pieces directly to the output stream without using a fixed-size buffer.

var buf: [256]u8 = undefined;
for (windows, 0..) |win, idx| {
    const win_str = std.fmt.bufPrint(&buf, " {d}:{s}{s}", .{ idx, win.name, suffix }) catch " win";
    try self.writeBytes(win_str);

With many windows or long window names, bufPrint catches the overflow and falls back to " win" — but this produces broken output with missing window indices and names. The status bar silently shows garbage entries instead of failing gracefully. A max-truncation strategy or dynamic allocation would be more robust.