Kaydet (Commit) c9f22b95 authored tarafından Neal Norwitz's avatar Neal Norwitz

Backport 58332: 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.
üst 14f848bb
......@@ -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;
......
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