--- 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;