mirror of
https://github.com/python/cpython.git
synced 2025-07-30 06:34:15 +00:00
Fix Coverity #159.
This code was broken if save() returned a negative number since i contained a boolean value and then we compared i < 0 which should never be true. Will backport (assuming it's necessary)
This commit is contained in:
parent
3adac21762
commit
5a29dd30e0
1 changed files with 1 additions and 1 deletions
|
@ -2249,7 +2249,7 @@ save_reduce(Picklerobject *self, PyObject *args, PyObject *ob)
|
|||
Py_INCREF(temp);
|
||||
PyTuple_SET_ITEM(newargtup, i-1, temp);
|
||||
}
|
||||
i = save(self, newargtup, 0) < 0;
|
||||
i = save(self, newargtup, 0);
|
||||
Py_DECREF(newargtup);
|
||||
if (i < 0)
|
||||
return -1;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue