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.Decompress.decompress() retains pointer to input buffer without acquiring reference to it #60615
Comments
When calling zlib.Decompress.decompress() with a max_length argument, If the data object gets deallocated between the calls to decompress() I see two potential solutions:
Solution 2 would be less disruptive to code that depends on the existing Any thoughts? |
The decompressor does not hold a reference to the data object, but it holds a reference to the data. It's the unconsumed_tail attribute. The patch is simple. |
New changeset c3828831861c by Nadeem Vawda in branch '2.7': New changeset a1db815d0829 by Nadeem Vawda in branch '3.2': New changeset a7934fe2927e by Nadeem Vawda in branch '3.3': New changeset d63c751e9f01 by Nadeem Vawda in branch 'default': |
New changeset be40a10d553a by Nadeem Vawda in branch '2.7': |
Ah, that's much nicer than either of my ideas. Patch committed. Thanks! |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: