Skip to content

tls_codec: return an error instead of panicking on truncated VLBytes - #2414

Open
WorkingRobot wants to merge 1 commit into
RustCrypto:masterfrom
WorkingRobot:tls_codec/truncated-vlbytes-debug-assert
Open

tls_codec: return an error instead of panicking on truncated VLBytes#2414
WorkingRobot wants to merge 1 commit into
RustCrypto:masterfrom
WorkingRobot:tls_codec/truncated-vlbytes-debug-assert

Conversation

@WorkingRobot

Copy link
Copy Markdown

In debug mode, VLBytes::tls_deserialize_bytes and VLByteVec::tls_deserialize_bytes panic instead of returning an Err. Panics should happen on invariants, not on untrusted input.

Signed-off-by: Asriel Camora <asriel@camora.dev>
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