File tree Expand file tree Collapse file tree 2 files changed +7
-0
lines changed
Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -24,6 +24,9 @@ Core and builtins
2424- Issue #1179: Fix CVE-2007-4965 and CVE-2008-1679, multiple integer
2525 overflows in the imageop and rgbimgmodule modules.
2626
27+ - Issue #2586: Fix CVE-2008-1721, zlib crash from
28+ zlib.decompressobj().flush(val) when val is not positive.
29+
2730Extension Modules
2831-----------------
2932
Original file line number Diff line number Diff line change @@ -669,6 +669,10 @@ PyZlib_unflush(compobject *self, PyObject *args)
669669
670670 if (!PyArg_ParseTuple (args , "|i:flush" , & length ))
671671 return NULL ;
672+ if (length <= 0 ) {
673+ PyErr_SetString (PyExc_ValueError , "length must be greater than zero" );
674+ return NULL ;
675+ }
672676 if (!(retval = PyString_FromStringAndSize (NULL , length )))
673677 return NULL ;
674678
You can’t perform that action at this time.
0 commit comments