diff options
author | Martin Wilke <miwi@FreeBSD.org> | 2008-04-25 08:16:04 +0000 |
---|---|---|
committer | Martin Wilke <miwi@FreeBSD.org> | 2008-04-25 08:16:04 +0000 |
commit | 87262d65c47c91e2713e485a3d513f6e47086a87 (patch) | |
tree | d65fe1a4422d188b4d15cbc5647ce54879a93b20 /lang/python31/files/patch-Lib-test-test_zlib.py | |
parent | - Document python -- Integer Signedness Error in zlib Module (diff) |
- Fix zlib crash from zlib.decompressobj().flush(val)
when val was not positive. It tried to allocate negative
or zero memory. That fails.
- Bump PORTREVISION
Reviewed by: alexbl
Obtained from: python svn
Security: http://www.vuxml.org/freebsd/ec41c3e2-129c-11dd-bab7-0016179b2dd5.html
Notes
Notes:
svn path=/head/; revision=211912
Diffstat (limited to 'lang/python31/files/patch-Lib-test-test_zlib.py')
-rw-r--r-- | lang/python31/files/patch-Lib-test-test_zlib.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/lang/python31/files/patch-Lib-test-test_zlib.py b/lang/python31/files/patch-Lib-test-test_zlib.py new file mode 100644 index 000000000000..425572d2574d --- /dev/null +++ b/lang/python31/files/patch-Lib-test-test_zlib.py @@ -0,0 +1,14 @@ +--- Lib/test/test_zlib.py 2008/04/08 23:47:30 62234 ++++ Lib/test/test_zlib.py 2008/04/09 00:25:17 62235 +@@ -83,6 +83,11 @@ + # verify failure on building decompress object with bad params + self.assertRaises(ValueError, zlib.decompressobj, 0) + ++ def test_decompressobj_badflush(self): ++ # verify failure on calling decompressobj.flush with bad params ++ self.assertRaises(ValueError, zlib.decompressobj().flush, 0) ++ self.assertRaises(ValueError, zlib.decompressobj().flush, -1) ++ + + + class CompressTestCase(unittest.TestCase): |