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

fix panic in crc32 hash calc #222

Merged
merged 1 commit into from
Oct 9, 2024
Merged

fix panic in crc32 hash calc #222

merged 1 commit into from
Oct 9, 2024

Conversation

folkertdev
Copy link
Collaborator

fixes #219

The logic attempted to incorporate uninitialized bytes into the hash. That panics because of bounds checking, and we now handle it properly by having an upper bound to the slice index.

Copy link

codecov bot commented Oct 9, 2024

Codecov Report

Attention: Patch coverage is 76.19048% with 25 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
test-libz-rs-sys/src/deflate.rs 77.77% 22 Missing ⚠️
zlib-rs/src/deflate/hash_calc.rs 50.00% 3 Missing ⚠️
Files with missing lines Coverage Δ
zlib-rs/src/deflate/hash_calc.rs 80.71% <50.00%> (-1.30%) ⬇️
test-libz-rs-sys/src/deflate.rs 98.16% <77.77%> (-1.06%) ⬇️

@folkertdev folkertdev merged commit eb20ece into main Oct 9, 2024
18 checks passed
@folkertdev folkertdev deleted the fix-issue-219 branch October 9, 2024 09:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

OOB panic in Crc32HashCalc::insert_string()
1 participant