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

decompressBound tests and fix #3373

Merged
merged 2 commits into from
Dec 17, 2022
Merged

decompressBound tests and fix #3373

merged 2 commits into from
Dec 17, 2022

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