PyTuple_SetItem should require that the tuple's refcnt is one!

This commit is contained in:
Guido van Rossum 1997-08-17 16:25:45 +00:00
parent 607b33a1fe
commit 787bdd37a0
1 changed files with 1 additions and 1 deletions

View File

@ -133,7 +133,7 @@ PyTuple_SetItem(op, i, newitem)
{
register PyObject *olditem;
register PyObject **p;
if (!PyTuple_Check(op)) {
if (!PyTuple_Check(op) || op->ob_refcnt != 1) {
Py_XDECREF(newitem);
PyErr_BadInternalCall();
return -1;