Skip to content

decompressBound tests and fix#3373

Merged
Cyan4973 merged 2 commits intodevfrom
decompressBound
Dec 17, 2022
Merged

decompressBound tests and fix#3373
Cyan4973 merged 2 commits intodevfrom
decompressBound

Conversation

@Cyan4973
Copy link
Contributor

This is a complement to #3362 , and finalize fixes for #3323 .

There are additional unit tests to ensure behavior of ZSTD_decompressBound(),
including a new "overflow" test which attempts to overflow intermediate results on 32-bit systems
(ZSTD_decompressBound() return type is unsigned long long which is >= 64-bit , therefore only intermediate calculation results feature overflow risks).

Fixed the detected overflow.

fixed an overflow in an intermediate result on 32-bit platform.
Checked that the new test catch this bug in 32-bit mode.
for environments with stringent compilation warnings.
@Cyan4973 Cyan4973 merged commit 3a484ef into dev Dec 17, 2022
@Cyan4973 Cyan4973 deleted the decompressBound branch January 13, 2023 04:27
@Cyan4973 Cyan4973 mentioned this pull request Feb 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants