diff options
author | Martin Wilke <miwi@FreeBSD.org> | 2008-04-25 08:16:04 +0000 |
---|---|---|
committer | Martin Wilke <miwi@FreeBSD.org> | 2008-04-25 08:16:04 +0000 |
commit | 87262d65c47c91e2713e485a3d513f6e47086a87 (patch) | |
tree | d65fe1a4422d188b4d15cbc5647ce54879a93b20 /lang/python30/files/patch-Modules-zlibmodule.c | |
parent | - Document python -- Integer Signedness Error in zlib Module (diff) |
- Fix zlib crash from zlib.decompressobj().flush(val)
when val was not positive. It tried to allocate negative
or zero memory. That fails.
- Bump PORTREVISION
Reviewed by: alexbl
Obtained from: python svn
Security: http://www.vuxml.org/freebsd/ec41c3e2-129c-11dd-bab7-0016179b2dd5.html
Notes
Notes:
svn path=/head/; revision=211912
Diffstat (limited to 'lang/python30/files/patch-Modules-zlibmodule.c')
-rw-r--r-- | lang/python30/files/patch-Modules-zlibmodule.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/lang/python30/files/patch-Modules-zlibmodule.c b/lang/python30/files/patch-Modules-zlibmodule.c new file mode 100644 index 000000000000..7875a40ada7c --- /dev/null +++ b/lang/python30/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; + |