Skip to content

Cap Stream receive buffer so incomplete frames cannot grow until OOM #8

Description

@enochgroot

lib/msgpack.js concatenates self.buf on every data with allocUnsafe(self.buf.length + d.length) and no max. Incomplete frames (kScanContinue) keep the buffer. SEND_QUEUE_CAP bounds send, not receive. close/end/error do not clear self.buf.

Oversized headers already throw and drop the buffer. Incomplete frames under ScanOne still grow.

Reject (and reset the socket) when self.buf.length + d.length would exceed a documented MAX_STREAM_BYTES before allocate.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions