freebsd-ports/lang/python24/files/patch-modules_almodule.c
Martin Wilke 5d6556dc39 - add patches from upstream svn rev.65333, fix integer overflows in
memory allocation (CVE-2008-2315 and CVE-2008-2316)
- also apply upstream svn rev.65262, fixes overflow checks in memory
  allocation (CVE-2008-3142 and CVE-2008-3144)

Approved by:	portmgr (pav)
Security:	http://www.vuxml.org/freebsd/0dccaa28-7f3c-11dd-8de5-0030843d3802.html
2008-09-11 08:05:23 +00:00

14 lines
425 B
C

--- Modules/almodule.c.orig 2006-09-27 21:17:32.000000000 +0200
+++ Modules/almodule.c
@@ -1633,9 +1633,11 @@ al_QueryValues(PyObject *self, PyObject
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;
}