Skip to content

gh-160121: Correct repeated calls to decompress() with max_length=0 - #160517

Open
emmatyping wants to merge 1 commit into
python:mainfrom
emmatyping:fix-decompress-max-length-0
Open

emmatyping wants to merge 1 commit into
python:mainfrom
emmatyping:fix-decompress-max-length-0

Conversation

@emmatyping

@emmatyping emmatyping commented Oct 23, 2026 •

Copy link
Copy Markdown
Member

For compression.zstd, zlib, and bz2, buffer input and return empty bytes for calls to the decompress() method when max_length=0. Previously this could cause errors in ZstdDecompressor. I've made this change across the three modules because I would like to have the same behavior across modules. LZMA fixes are being worked on in #160205. I will wait to merge until after that PR is done to merge the NEWS entries.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant