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

refactor zlib to simplify our implementation #2679

Closed
wants to merge 4 commits into from
Closed

Conversation

anonrig
Copy link
Member

@anonrig anonrig commented Sep 9, 2024

A little bit late to the party but, I'm following up to @jasnell's comment on context()

@anonrig anonrig requested a review from jasnell September 9, 2024 20:07
@anonrig anonrig requested review from a team as code owners September 9, 2024 20:07
@anonrig anonrig requested a review from jp4a50 September 9, 2024 20:07
@anonrig anonrig force-pushed the yagiz/refactor-zlib branch from ac508a9 to b9ade90 Compare September 9, 2024 20:23
Co-authored-by: Nicholas Paun <[email protected]>
@@ -338,8 +338,10 @@ class ZlibUtil final: public jsg::Object {
}

protected:
CompressionContext* context() {
return &context_;
CompressionContext context;
Copy link
Member

Choose a reason for hiding this comment

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

This creates a use-after-free error because allocations will be destroyed before context.

@anonrig anonrig closed this Sep 11, 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.

3 participants