Skip to content

Only check header validity when decoding messages#364

Merged
guelfey merged 3 commits intomasterfrom
fix/validate_header_only
Apr 9, 2023
Merged

Only check header validity when decoding messages#364
guelfey merged 3 commits intomasterfrom
fix/validate_header_only

Conversation

@guelfey
Copy link
Member

@guelfey guelfey commented Apr 9, 2023

Don't just do a full encode again. Includes #353.

guelfey and others added 3 commits April 9, 2023 13:35
Encoding a message with msg.EncodeTo to check
whether the message is valid right after it was decoded
looks redundant and incurs 13.4kB, 140 allocs per operation.
If the message was corrupted,
it would have failed at the decoding stage in ReadMessage.
@guelfey guelfey self-assigned this Apr 9, 2023
@guelfey guelfey merged commit a2da220 into master Apr 9, 2023
@guelfey guelfey deleted the fix/validate_header_only branch April 9, 2023 11:49
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.

2 participants