From: Neal Norwitz Date: Fri, 5 Oct 2007 05:01:38 +0000 (+0000) Subject: Fix Coverity #159. X-Git-Tag: v2.6a1~1225 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5a29dd30e0117a59714fa083a946997f2355eede;p=python 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) --- diff --git a/Modules/cPickle.c b/Modules/cPickle.c index fbf6a12baf..227f02c87a 100644 --- a/Modules/cPickle.c +++ b/Modules/cPickle.c @@ -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;