eval_code2(): In the extended calling syntax opcodes, you must check

the return value of PySequence_Length().  If an exception occurred,
the returned length will be -1.  Make sure this doesn't get obscurred,
and that the bogus length isn't used.
This commit is contained in:
Barry Warsaw 2000-03-29 18:30:03 +00:00
parent 918429b3b2
commit 4961ef7086

View file

@ -1636,6 +1636,14 @@ eval_code2(co, globals, locals,
break;
}
nstar = PySequence_Length(stararg);
if (nstar < 0) {
if (!PyErr_Occurred)
PyErr_SetString(
PyExc_TypeError,
"len() of unsized object");
x = NULL;
break;
}
}
if (nk > 0) {
if (kwdict == NULL) {