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
24
24
- Issue #1179: Fix CVE-2007-4965 and CVE-2008-1679, multiple integer
25
25
overflows in the imageop and rgbimgmodule modules.
26
26
27
+ - Issue #2586: Fix CVE-2008-1721, zlib crash from
28
+ zlib.decompressobj().flush(val) when val is not positive.
29
+
27
30
Extension Modules
28
31
-----------------
29
32
Original file line number Diff line number Diff line change @@ -669,6 +669,10 @@ PyZlib_unflush(compobject *self, PyObject *args)
669
669
670
670
if (!PyArg_ParseTuple (args , "|i:flush" , & length ))
671
671
return NULL ;
672
+ if (length <= 0 ) {
673
+ PyErr_SetString (PyExc_ValueError , "length must be greater than zero" );
674
+ return NULL ;
675
+ }
672
676
if (!(retval = PyString_FromStringAndSize (NULL , length )))
673
677
return NULL ;
674
678
You can’t perform that action at this time.
0 commit comments