summaryrefslogtreecommitdiff
path: root/lang/python25/patches/patch-cc
blob: 56b019e3f985e9da56cd8f2b38d6d14ce5f7d06c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
$NetBSD: patch-cc,v 1.1.2.2 2008/09/02 14:13:33 rtr Exp $

Patch for CVE-2008-3142 taken from Gentoo.

--- Modules/almodule.c.orig	2006-09-25 07:53:42.000000000 +0100
+++ Modules/almodule.c	2008-08-30 10:39:43.000000000 +0100
@@ -1633,9 +1633,11 @@
 	if (nvals < 0)
 		goto cleanup;
 	if (nvals > setsize) {
+		ALvalue *old_return_set = return_set;
 		setsize = nvals;
 		PyMem_RESIZE(return_set, ALvalue, setsize);
 		if (return_set == NULL) {
+			return_set = old_return_set;
 			PyErr_NoMemory();
 			goto cleanup;
 		}