Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

const-oid: fix Encoder size check and off-by-one error #1304

Merged
merged 1 commit into from
Jan 5, 2024

Conversation

tarcieri
Copy link
Member

@tarcieri tarcieri commented Jan 5, 2024

The Encoder previously returned Error::Length even when there was one remaining byte in the buffer.

This fixes that error and adds an edge case test.

The `Encoder` previously returned `Error::Length` even when there was
one remaining byte in the buffer.

This fixes that error and adds an edge case test.
@baloo
Copy link
Member

baloo commented Jan 5, 2024

Missing the test?

@tarcieri
Copy link
Member Author

tarcieri commented Jan 5, 2024

The test is the existing one in encoder.rs, however it passed before because it was using the wrong length

@tarcieri tarcieri merged commit 12820eb into master Jan 5, 2024
@tarcieri tarcieri deleted the const-oid/fix-size-and-off-by-one-error branch January 5, 2024 03:43
@tarcieri tarcieri mentioned this pull request Feb 24, 2025
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