Commit ac6a37ae authored by Guido van Rossum's avatar Guido van Rossum

Fix a potential problem in PyLong_FromString(): could fall through the

for loop with z==NULL but continue to reference z later.
parent df3d8756
......@@ -499,6 +499,8 @@ PyLong_FromString(str, pend, base)
Py_DECREF(z);
z = temp;
}
if (z == NULL)
return NULL;
if (str == start) {
PyErr_SetString(PyExc_ValueError,
"no digits in long int constant");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment