Problem
The daemon uses unbounded JSON-lines input and the Swift LineBuffer retains an unlimited partial line.
Evidence: https://github.com/richardcase/clowder/blob/b5492d5/crates/clowder-daemon/src/control_json.rs#L40-L56
Swift buffer: https://github.com/richardcase/clowder/blob/b5492d5/macos/Sources/ClowderCore/LineBuffer.swift#L7-L20
Impact
A peer that never sends a newline can grow process memory indefinitely.
Acceptance criteria
- Define one protocol maximum for control lines.
- Enforce it in both implementations and close/report oversized frames.
- Add chunked over-limit tests.
Problem
The daemon uses unbounded JSON-lines input and the Swift
LineBufferretains an unlimited partial line.Evidence: https://github.com/richardcase/clowder/blob/b5492d5/crates/clowder-daemon/src/control_json.rs#L40-L56
Swift buffer: https://github.com/richardcase/clowder/blob/b5492d5/macos/Sources/ClowderCore/LineBuffer.swift#L7-L20
Impact
A peer that never sends a newline can grow process memory indefinitely.
Acceptance criteria