]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-21872: fix lzma library decompresses data incompletely (GH-14048)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Thu, 12 Sep 2019 14:41:30 +0000 (07:41 -0700)
committerGitHub <noreply@github.com>
Thu, 12 Sep 2019 14:41:30 +0000 (07:41 -0700)
commita3c53a1b45b05bcb69660eac5a271443b37ecc42
tree1806761b3fa9f4f302f1aa5cbde8577b18cd2cef
parentc8d1338441114fbc504625bc66607e7996018a5d
bpo-21872: fix lzma library decompresses data incompletely (GH-14048)

* 1. add test case with wrong behavior
* 2. fix bug when max_length == -1
* 3. allow b"" as valid input data for decompress_buf()
* 4. when max_length >= 0, let needs_input mechanism works
* add more asserts to test case
(cherry picked from commit 4ffd05d7ec47cfd0d7fc95dce851633be9663255)

Co-authored-by: animalize <animalize@users.noreply.github.com>
Lib/test/test_lzma.py
Misc/NEWS.d/next/Library/2019-06-12-08-56-22.bpo-21872.V9QGGN.rst [new file with mode: 0644]
Modules/_lzmamodule.c