Skip to content

ssh-encoding: add MAX_MSG_SIZE constant - #628

Open
tarcieri wants to merge 1 commit into
masterfrom
ssh-encoding/max-msg-size
Open

tarcieri wants to merge 1 commit into
masterfrom
ssh-encoding/max-msg-size

Conversation

@tarcieri

Copy link
Copy Markdown
Member

Adds a currently private constant (we can consider exposing it, but I kept it private to get started) with a hard maximum on the size of a message to be encoded, mirroring the SSHBUF_SIZE_MAX constant from OpenSSH (0x8000000, i.e. 128MiB)

To do this Decoder::new needs to be fallible, so that's been changed accordingly.

@tarcieri
tarcieri force-pushed the ssh-encoding/max-msg-size branch from e8f03f2 to f795a18 Compare November 13, 2026 22:15
Adds a currently private constant (we can consider exposing it, but I
kept it private to get started) with a hard maximum on the size of a
message to be encoded, mirroring the `SSHBUF_SIZE_MAX` constant from
OpenSSH (0x8000000, i.e. 128MiB)

To do this `Decoder::new` needs to be fallible, so that's been changed
accordingly.
@tarcieri
tarcieri force-pushed the ssh-encoding/max-msg-size branch from f795a18 to 2215ddc Compare November 13, 2026 23:45

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant