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

Remove excessive bounds checking in IndexedReader #327

Merged
merged 1 commit into from May 8, 2023

Conversation

drewnoakes
Copy link
Owner

Fixes #62

Adds a new abstract overload for reading a single byte. That method will not do any explicit bounds validation, so callers must do that beforehand. In cases where multiple bytes are read, the validation can be performed once per value, rather than once per byte.

@drewnoakes
Copy link
Owner Author

This has some failures in the (manual) regression tests that need to be investigated.

@drewnoakes drewnoakes marked this pull request as draft May 1, 2023 02:28
Fixes #62

Adds a new abstract overload for reading a single byte. That method will not do any explicit bounds validation, so callers must do that beforehand. In cases where multiple bytes are read, the validation can be performed once per value, rather than once per byte.
@drewnoakes drewnoakes marked this pull request as ready for review May 8, 2023 04:15
@drewnoakes drewnoakes merged commit 2fd3932 into master May 8, 2023
4 checks passed
@drewnoakes drewnoakes deleted the reduce-bounds-checking branch May 8, 2023 04:16
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.

Excessive bounds checking when reading multi-byte values
1 participant