diff options
| author | Serhiy Storchaka <storchaka@gmail.com> | 2016-09-27 17:24:19 (GMT) |
|---|---|---|
| committer | Serhiy Storchaka <storchaka@gmail.com> | 2016-09-27 17:24:19 (GMT) |
| commit | be43f2019fd5c56cdf9ca337ed23c1ef4dc9af38 (patch) | |
| tree | 6a00762f3a35466ead9346402b7db0894ffd9ad7 /Lib/test/test_lzma.py | |
| parent | c019158a4c7a7b79a7d2d4f1de87c8789a5ec13d (diff) | |
| parent | a12e7842a5f572afd6bde108f24931f9262f38ef (diff) | |
| download | cpython-be43f2019fd5c56cdf9ca337ed23c1ef4dc9af38.zip cpython-be43f2019fd5c56cdf9ca337ed23c1ef4dc9af38.tar.gz cpython-be43f2019fd5c56cdf9ca337ed23c1ef4dc9af38.tar.bz2 | |
Issue #28275: Fixed possible use adter free in LZMADecompressor.decompress().
Original patch by John Leitch.
Diffstat (limited to 'Lib/test/test_lzma.py')
| -rw-r--r-- | Lib/test/test_lzma.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Lib/test/test_lzma.py b/Lib/test/test_lzma.py index d310bea..77ca022 100644 --- a/Lib/test/test_lzma.py +++ b/Lib/test/test_lzma.py @@ -246,6 +246,15 @@ class CompressorDecompressorTestCase(unittest.TestCase): lzd = LZMADecompressor(lzma.FORMAT_RAW, filters=FILTERS_RAW_1) self.assertRaises(LZMAError, lzd.decompress, COMPRESSED_XZ) + def test_decompressor_bug_28275(self): + # Test coverage for Issue 28275 + lzd = LZMADecompressor() + for i in range(2): + try: + lzd.decompress(COMPRESSED_RAW_1) + except LZMAError: + pass + # Test that LZMACompressor->LZMADecompressor preserves the input data. def test_roundtrip_xz(self): |
