Skip to content

bpo-41486: Fix initial buffer size can't > UINT32_MAX in zlib module#25738

Merged
gpshead merged 3 commits intomasterfrom
unknown repository
Apr 30, 2021
Merged

bpo-41486: Fix initial buffer size can't > UINT32_MAX in zlib module#25738
gpshead merged 3 commits intomasterfrom
unknown repository

Conversation

@ghost
Copy link
Copy Markdown

@ghost ghost commented Apr 30, 2021

After commit f9bedb6, in 64-bit build,
if the initial buffer size > UINT32_MAX, ValueError will be raised.

These two functions are affected:

  1. zlib.decompress(data, /, wbits=MAX_WBITS, bufsize=DEF_BUF_SIZE)
  2. zlib.Decompress.flush([length])

This commit re-allows the size > UINT32_MAX.

https://bugs.python.org/issue41486

After commit f9bedb6, in 64-bit build,
if the initial buffer size > UINT32_MAX, ValueError will be raised.

These two functions are affected:
1. zlib.decompress(data, /, wbits=MAX_WBITS, bufsize=DEF_BUF_SIZE)
2. zlib.Decompress.flush([length])

This commit re-allows the size > UINT32_MAX.
Comment thread Modules/zlibmodule.c
@gpshead gpshead self-assigned this Apr 30, 2021
@gpshead gpshead added type-bug An unexpected behavior, bug, or error type-feature A feature request or enhancement labels Apr 30, 2021
Comment thread Modules/zlibmodule.c
@gpshead gpshead merged commit 251ffa9 into python:master Apr 30, 2021
@ghost ghost deleted the zlib_init_size branch May 1, 2021 05:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip news type-bug An unexpected behavior, bug, or error type-feature A feature request or enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants