ports/lang/python23/files/patch-Lib-test-test_zlib.py
Martin Wilke a90aa21ef5 - 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

PR:		123153
Submitted by:	Nick Barkas <snb@threerings.net>
Security:	http://www.vuxml.org/freebsd/ec41c3e2-129c-11dd-bab7-0016179b2dd5.html
2008-04-28 07:39:59 +00:00

15 lines
567 B
Python

--- 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):