Skip to content

Add null pointer checks to avoid segfaults - #72

Closed
nhz2 wants to merge 2 commits into
masterfrom
nz/null-pointer-checks
Closed

Add null pointer checks to avoid segfaults#72
nhz2 wants to merge 2 commits into
masterfrom
nz/null-pointer-checks

Conversation

@nhz2

@nhz2nhz2 commented Sep 15, 2024

Copy link
Copy Markdown
Member

Fixes#70

@codecov

codecovBot commented Sep 15, 2024

Copy link
Copy Markdown

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.

@nhz2nhz2 mentioned this pull request Sep 15, 2024
@mkitti

Copy link
Copy Markdown
Member

Add tests

@mkitti

Copy link
Copy Markdown
Member

@nhz2

nhz2 commented Sep 16, 2024

Copy link
Copy Markdown
MemberAuthor

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

nhz2 commented Sep 16, 2024

Copy link
Copy Markdown
MemberAuthor

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

@nhz2nhz2 closed this Sep 16, 2024
Sign up for freeto 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

@nhz2@mkitti