aboutsummaryrefslogtreecommitdiff
path: root/lang/python31
diff options
context:
space:
mode:
authorMartin Wilke <miwi@FreeBSD.org>2008-04-25 08:16:04 +0000
committerMartin Wilke <miwi@FreeBSD.org>2008-04-25 08:16:04 +0000
commit87262d65c47c91e2713e485a3d513f6e47086a87 (patch)
treed65fe1a4422d188b4d15cbc5647ce54879a93b20 /lang/python31
parent0af08ff3ddcf2240bacb758f8c70071a85203643 (diff)
downloadports-87262d65c47c91e2713e485a3d513f6e47086a87.tar.gz
ports-87262d65c47c91e2713e485a3d513f6e47086a87.zip
Notes
Diffstat (limited to 'lang/python31')
-rw-r--r--lang/python31/Makefile2
-rw-r--r--lang/python31/files/patch-Lib-test-test_zlib.py14
-rw-r--r--lang/python31/files/patch-Modules-zlibmodule.c13
3 files changed, 28 insertions, 1 deletions
diff --git a/lang/python31/Makefile b/lang/python31/Makefile
index 3e19ec12e903..087ddd147bfc 100644
--- a/lang/python31/Makefile
+++ b/lang/python31/Makefile
@@ -6,7 +6,7 @@
PORTNAME= python25
PORTVERSION= 2.5.2
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= lang python ipv6
MASTER_SITES= ${PYTHON_MASTER_SITES}
MASTER_SITE_SUBDIR= ${PYTHON_MASTER_SITE_SUBDIR}
diff --git a/lang/python31/files/patch-Lib-test-test_zlib.py b/lang/python31/files/patch-Lib-test-test_zlib.py
new file mode 100644
index 000000000000..425572d2574d
--- /dev/null
+++ b/lang/python31/files/patch-Lib-test-test_zlib.py
@@ -0,0 +1,14 @@
+--- Lib/test/test_zlib.py 2008/04/08 23:47:30 62234
++++ Lib/test/test_zlib.py 2008/04/09 00:25:17 62235
+@@ -83,6 +83,11 @@
+ # verify failure on building decompress object with bad params
+ self.assertRaises(ValueError, zlib.decompressobj, 0)
+
++ def test_decompressobj_badflush(self):
++ # verify failure on calling decompressobj.flush with bad params
++ self.assertRaises(ValueError, zlib.decompressobj().flush, 0)
++ self.assertRaises(ValueError, zlib.decompressobj().flush, -1)
++
+
+
+ class CompressTestCase(unittest.TestCase):
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;
+