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

zlib: fix memory leak for invalid input #22713

Closed
wants to merge 3 commits into from

Conversation

addaleax
Copy link
Member

@addaleax addaleax commented Sep 5, 2018

Don’t toggle the weak/strong reference flag from the error
handler, that’s too confusing. Instead, always do it in the
code that handles the write call.

Fixes: #22705

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines

Don’t toggle the weak/strong reference flag from the error
handler, that’s too confusing. Instead, always do it in the
code that handles the write call.

Fixes: nodejs#22705
@nodejs-github-bot nodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. zlib Issues and PRs related to the zlib subsystem. labels Sep 5, 2018
@mscdex
Copy link
Contributor

mscdex commented Sep 5, 2018

Why did Travis fail but the other checks show as passing? Is the test flaky or are the checks not reporting the correct status?

@addaleax addaleax added the fast-track PRs that do not need to wait for 48 hours to land. label Sep 5, 2018
@addaleax
Copy link
Member Author

addaleax commented Sep 5, 2018

@mscdex Flakyness, yes – should be fixed now. :)

CI: https://ci.nodejs.org/job/node-test-pull-request/17037/

I’d like to fast-track this, since it’s not a complex fix and it would be good to have this in 10.10.0 (fyi @targos). Please 👍 if you agree.

@addaleax
Copy link
Member Author

addaleax commented Sep 5, 2018

New CI: https://ci.nodejs.org/job/node-test-pull-request/17040/ (:heavy_check_mark:)

@addaleax
Copy link
Member Author

addaleax commented Sep 6, 2018

Landed in 0c30d0e

@addaleax addaleax closed this Sep 6, 2018
@addaleax addaleax deleted the fix-zlib-memory-leak branch September 6, 2018 08:55
addaleax added a commit that referenced this pull request Sep 6, 2018
Don’t toggle the weak/strong reference flag from the error
handler, that’s too confusing. Instead, always do it in the
code that handles the write call.

Fixes: #22705

PR-URL: #22713
Reviewed-By: James M Snell <[email protected]>
targos pushed a commit that referenced this pull request Sep 6, 2018
Don’t toggle the weak/strong reference flag from the error
handler, that’s too confusing. Instead, always do it in the
code that handles the write call.

Fixes: #22705

PR-URL: #22713
Reviewed-By: James M Snell <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c++ Issues and PRs that require attention from people who are familiar with C++. fast-track PRs that do not need to wait for 48 hours to land. zlib Issues and PRs related to the zlib subsystem.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Memory leak when using zlib.inflate to inflate invalid data v10.9.0
4 participants