Skip to content

Commit

Permalink
Merge pull request #2091 from kuzudb/decompression-overflow-fix
Browse files Browse the repository at this point in the history
Fix bounds check in integer bitpacking
  • Loading branch information
benjaminwinger committed Sep 26, 2023
2 parents 9b4fd80 + 08a353f commit 3753f71
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/storage/store/compression.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ void IntegerBitpacking<T>::decompressFromPage(const uint8_t* srcBuffer, uint64_t
}

// Use fastunpack to directly unpack the full-sized chunks
for (; dstIndex < dstOffset + numValues - numValues % CHUNK_SIZE; dstIndex += CHUNK_SIZE) {
for (; dstIndex + CHUNK_SIZE <= dstOffset + numValues; dstIndex += CHUNK_SIZE) {
FastPForLib::fastunpack(
(const uint32_t*)srcCursor, (U*)dstBuffer + dstIndex, header.bitWidth);
if (header.hasNegative) {
Expand Down

0 comments on commit 3753f71

Please sign in to comment.