szn

Bug 262 — Protocol Message Corruption on Partial Write in sendRequestCellSize

262. Protocol Message Corruption on Partial Write in sendRequestCellSize

File: src/server/server.zig:2177–2202 Severity: HIGH Status: ✅ FIXED — partial writes now queue remaining bytes onto dc.out_buf. Unit test added.

sendRequestCellSize performs a non-blocking c.write of a 5-byte header. If c.write writes fewer than 5 bytes ($0 < n < 5$), n < 0 evaluates to false, and the unsent 5 - n bytes are silently discarded.

Impact: The client receives a corrupted 2-to-4-byte header packet, triggering error.InvalidPacket and client disconnection.