95931af496
from upstream CVS, bump PKGREVISION
15 lines
484 B
Text
15 lines
484 B
Text
$NetBSD: patch-au,v 1.1 2008/04/11 10:32:33 drochner Exp $
|
|
|
|
--- Modules/zlibmodule.c.orig 2008-04-11 12:21:45.000000000 +0200
|
|
+++ Modules/zlibmodule.c
|
|
@@ -669,6 +669,10 @@ PyZlib_unflush(compobject *self, PyObjec
|
|
|
|
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;
|
|
|