SOURCES: python-bug-216503.patch (NEW) - from python svn: http://s...
glen
glen at pld-linux.org
Sun Apr 13 01:05:15 CEST 2008
Author: glen Date: Sat Apr 12 23:05:15 2008 GMT
Module: SOURCES Tag: HEAD
---- Log message:
- from python svn: http://svn.python.org/view?rev=62235&view=rev
---- Files affected:
SOURCES:
python-bug-216503.patch (NONE -> 1.1) (NEW)
---- Diffs:
================================================================
Index: SOURCES/python-bug-216503.patch
diff -u /dev/null SOURCES/python-bug-216503.patch:1.1
--- /dev/null Sun Apr 13 01:05:15 2008
+++ SOURCES/python-bug-216503.patch Sun Apr 13 01:05:10 2008
@@ -0,0 +1,27 @@
+--- /python/trunk/Lib/test/test_zlib.py 2008/04/08 23:47:30 62234
++++ python/trunk/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):
+--- /python/trunk/Modules/zlibmodule.c 2008/04/08 23:47:30 62234
++++ python/trunk/Modules/zlibmodule.c 2008/04/09 00:25:17 62235
+@@ -774,6 +774,10 @@
+
+ if (!PyArg_ParseTuple(args, "|i:flush", &length))
+ return NULL;
++ if (length <= 0) {
++ PyErr_SetString(PyExc_ValueError, "length must be greater than zero");
++ return NULL;
++ }
+ if (!(retval = PyString_FromStringAndSize(NULL, length)))
+ return NULL;
+
================================================================
More information about the pld-cvs-commit
mailing list