mirror of
https://github.com/python/cpython.git
synced 2025-08-30 05:35:08 +00:00
Fix memory leaks in zlib.compress() and .decompress().
Also, make sure that test_zlib tests decompress() for overly-large inputs.
This commit is contained in:
parent
d8eab60c00
commit
154bdf92fc
2 changed files with 12 additions and 14 deletions
|
@ -193,6 +193,7 @@ class CompressTestCase(BaseCompressTestCase, unittest.TestCase):
|
|||
data = b'x' * size
|
||||
try:
|
||||
self.assertRaises(OverflowError, zlib.compress, data, 1)
|
||||
self.assertRaises(OverflowError, zlib.decompress, data)
|
||||
finally:
|
||||
data = None
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue