Sophie

Sophie

distrib > Mandriva > 2009.0 > i586 > by-pkgid > e60c9f3ba1f047a2c18a7f3befdd595e > files > 9

python2.4-2.4.5-1mdv2009.0.src.rpm

--- Python-2.4.4/Modules/zlibmodule.c.cve	2008-04-23 18:42:44.000000000 +0200
+++ Python-2.4.4/Modules/zlibmodule.c	2008-04-23 18:43:43.000000000 +0200
@@ -669,6 +669,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;