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: check compression level in encode_zlib and encode_gzip #393

Merged
merged 4 commits into from
Aug 17, 2023

Conversation

fuchsnj
Copy link
Member

@fuchsnj fuchsnj commented Aug 17, 2023

closes: #257

This now ensures the compression level is valid to prevent a panic. The type def was updated to be fallible only if it's not known at compile-time to be valid.

@pront pront self-requested a review August 17, 2023 18:20
pront
pront previously approved these changes Aug 17, 2023
Copy link
Member

@pront pront left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@fuchsnj fuchsnj merged commit bb519f9 into main Aug 17, 2023
@fuchsnj fuchsnj deleted the fuchsnj/check_compression_level branch August 17, 2023 19:04
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.

encode_zlib compression_level isn't validated which can lead to a panic
2 participants