aboutsummaryrefslogtreecommitdiff
path: root/lang/python31/files/patch-Modules-zlibmodule.c
diff options
context:
space:
mode:
Diffstat (limited to 'lang/python31/files/patch-Modules-zlibmodule.c')
-rw-r--r--lang/python31/files/patch-Modules-zlibmodule.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/lang/python31/files/patch-Modules-zlibmodule.c b/lang/python31/files/patch-Modules-zlibmodule.c
new file mode 100644
index 000000000000..7875a40ada7c
--- /dev/null
+++ b/lang/python31/files/patch-Modules-zlibmodule.c
@@ -0,0 +1,13 @@
+--- Modules/zlibmodule.c.orig 2008-04-25 01:47:26.000000000 +0200
++++ Modules/zlibmodule.c 2008-04-25 01:48:17.000000000 +0200
+@@ -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;
+