mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
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
1 changed files with 2 additions and 0 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue