summaryrefslogtreecommitdiffstats
path: root/Objects/tupleobject.c
diff options
context:
space:
mode:
Diffstat (limited to 'Objects/tupleobject.c')
-rw-r--r--Objects/tupleobject.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/Objects/tupleobject.c b/Objects/tupleobject.c
index 6c2162a..3a8f072 100644
--- a/Objects/tupleobject.c
+++ b/Objects/tupleobject.c
@@ -330,6 +330,8 @@ tupleconcat(register PyTupleObject *a, register PyObject *bb)
}
#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) {
return NULL;