Fix decoder/encoder OOB paths; add ASAN regressions#15
Closed
jkammerland wants to merge 2 commits intomasterfrom
Closed
Fix decoder/encoder OOB paths; add ASAN regressions#15jkammerland wants to merge 2 commits intomasterfrom
jkammerland wants to merge 2 commits intomasterfrom
Conversation
Owner
jkammerland
commented
Jan 24, 2026
- Fix bstr basic_string_view decode: handle 0-length, bounds-check, and advance reader
- Add bounds checks for as_text_any/as_bstr_any and keep non-contiguous offsets consistent
- Validate fixed-size array/span group sizes before decode to prevent OOB writes
- Guard fixed-size output appender against buffer overflow (return status_code::error)
- Add crash/ASAN-focused regression tests for the above cases
- Fix IsFixedArray so std::span is treated as fixed-size (no tuple_size requirement)
- Fix bstr basic_string_view<byte> decode: handle 0-length, bounds-check, and advance reader - Add bounds checks for as_text_any/as_bstr_any and keep non-contiguous offsets consistent - Validate fixed-size array/span group sizes before decode to prevent OOB writes - Guard fixed-size output appender against buffer overflow (return status_code::error) - Add crash/ASAN-focused regression tests for the above cases - Fix IsFixedArray so std::span<T> is treated as fixed-size (no tuple_size requirement)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.