5d6556dc39
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
14 lines
425 B
C
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;
|
|
}
|