mirror of https://github.com/python/cpython
Fix a potential problem in PyLong_FromString(): could fall through the
for loop with z==NULL but continue to reference z later.
This commit is contained in:
parent
df3d8756b7
commit
ac6a37ae55
|
@ -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");
|
||||
|
|
Loading…
Reference in New Issue