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

Add null pointer checks to avoid segfaults #72

Closed
wants to merge 2 commits into from

Conversation

nhz2
Copy link
Member

@nhz2 nhz2 commented Sep 15, 2024

Fixes #70

Copy link

codecov bot commented Sep 15, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 62.76%. Comparing base (e7edfed) to head (f399913).

Additional details and impacted files
@@            Coverage Diff             @@
##           master      #72      +/-   ##
==========================================
+ Coverage   61.55%   62.76%   +1.20%     
==========================================
  Files           5        5              
  Lines         372      384      +12     
==========================================
+ Hits          229      241      +12     
  Misses        143      143              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@nhz2 nhz2 mentioned this pull request Sep 15, 2024
@mkitti
Copy link
Member

mkitti commented Sep 16, 2024

Add tests

@mkitti
Copy link
Member

mkitti commented Sep 16, 2024

@nhz2
Copy link
Member Author

nhz2 commented Sep 16, 2024

I am avoiding testing specific behavior of these functions, since after finalize, their behavior is undocumented and may change in the future. Specifically, instead of erroring, initialize could just re allocate the codec, or be a noop.

@nhz2
Copy link
Member Author

nhz2 commented Sep 16, 2024

Closing in favor of #74
If we are already checking for null, why error if we can just initialize again.

@nhz2 nhz2 closed this Sep 16, 2024
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.

Reusing a compressor
2 participants