diff --git a/Objects/tupleobject.c b/Objects/tupleobject.c index 9bc1fe7416b..2286b01dbe1 100644 --- a/Objects/tupleobject.c +++ b/Objects/tupleobject.c @@ -79,7 +79,7 @@ PyTuple_New(size) #endif { op = (PyTupleObject *) malloc( - sizeof(PyTupleObject) + size * sizeof(PyObject *)); + sizeof(PyTupleObject) + (size-1) * sizeof(PyObject *)); if (op == NULL) return PyErr_NoMemory();