Update of /cvsroot/python/python/dist/src/Objects In directory usw-pr-cvs1:/tmp/cvs-serv21718 Modified Files: Tag: release22-maint listobject.c tupleobject.c Log Message: Backport listobject.c 2.137 and tupleobject.c 2.75: Add checks for size overflow on list*n, list+list, tuple+tuple. Index: listobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/listobject.c,v retrieving revision 2.103.6.2 retrieving revision 2.103.6.3 diff -C2 -d -r2.103.6.2 -r2.103.6.3 *** listobject.c 23 May 2002 13:02:35 -0000 2.103.6.2 --- listobject.c 11 Oct 2002 21:13:13 -0000 2.103.6.3 *************** *** 400,403 **** --- 400,405 ---- #define b ((PyListObject *)bb) size = a->ob_size + b->ob_size; + if (size < 0) + return PyErr_NoMemory(); np = (PyListObject *) PyList_New(size); if (np == NULL) { *************** *** 428,431 **** --- 430,435 ---- n = 0; size = a->ob_size * n; + if (size/a->ob_size != n) + return PyErr_NoMemory(); np = (PyListObject *) PyList_New(size); if (np == NULL) Index: tupleobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/tupleobject.c,v retrieving revision 2.62.6.1 retrieving revision 2.62.6.2 diff -C2 -d -r2.62.6.1 -r2.62.6.2 *** tupleobject.c 28 Mar 2002 20:36:50 -0000 2.62.6.1 --- tupleobject.c 11 Oct 2002 21:13:14 -0000 2.62.6.2 *************** *** 338,341 **** --- 338,343 ---- #define b ((PyTupleObject *)bb) size = a->ob_size + b->ob_size; + if (size < 0) + return PyErr_NoMemory(); np = (PyTupleObject *) PyTuple_New(size); if (np == NULL) {
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4