diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2021-07-05 01:32:56 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-05 01:32:56 (GMT) |
commit | 22bcc0768e0f7eda2ae4de63aef113b1ddb4ddef (patch) | |
tree | 06d33faea79d6660352188b88f8e07a48545ac7d /Python/wordcode_helpers.h | |
parent | 68330b681a4b63cedad58fcfd1d9573209bad21d (diff) | |
download | cpython-22bcc0768e0f7eda2ae4de63aef113b1ddb4ddef.zip cpython-22bcc0768e0f7eda2ae4de63aef113b1ddb4ddef.tar.gz cpython-22bcc0768e0f7eda2ae4de63aef113b1ddb4ddef.tar.bz2 |
bpo-41486: zlib uses an UINT32_MAX sliding window for the output buffer (GH-26143)
* zlib uses an UINT32_MAX sliding window for the output buffer
These funtions have an initial output buffer size parameter:
- zlib.decompress(data, /, wbits=MAX_WBITS, bufsize=DEF_BUF_SIZE)
- zlib.Decompress.flush([length])
If the initial size > UINT32_MAX, use an UINT32_MAX sliding window, instead of clamping to UINT32_MAX.
Speed up when (the initial size == the actual size).
This fixes a memory consumption and copying performance regression in earlier 3.10 beta releases if someone used an output buffer larger than 4GiB with zlib.decompress.
Reviewed-by: Gregory P. Smith
(cherry picked from commit a9a69bb3ea1e6cf54513717212aaeae0d61b24ee)
Co-authored-by: Ma Lin <animalize@users.noreply.github.com>
Diffstat (limited to 'Python/wordcode_helpers.h')
0 files changed, 0 insertions, 0 deletions