Repository navigation
compression: handle zero-length NUQ decompression - #1062
Merged
copybara-service[bot] merged 1 commit intoOct 19, 2026
Merged
Conversation
When num == 0 with an aligned packed_ofs, num_groups computes to 0 and num_groups - 1 wraps to SIZE_MAX, causing DecWholeGroup to write 256 floats out of bounds (ASan heap-buffer-overflow WRITE). Return early on num == 0, mirroring the existing guard in IntCodec::DecompressAndZeroPad (compression/int-inl.h). Add TestZeroNum regression test: calls DecompressAndZeroPad with num=0 over a sentinel-filled buffer and verifies it is untouched. The test crashes under ASan without the fix and passes with it.
jan-wassenberg
approved these changes
Oct 19, 2026
jan-wassenberg
left a comment
Member
There was a problem hiding this comment.
Thanks for retargeting and fixing!
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.
Fix heap-buffer-overflow in NuqCodec::DecompressAndZeroPad when num == 0.
This retargets #1052 to the dev branch per maintainer request (Jan Wassenberg). Single commit, no rebase.