r58333 - python/branches/release25-maint/Modules/cPickle.c
Author: neal.norwitz Date: Fri Oct 5 07:05:24 2007 New Revision: 58333 Modified: python/branches/release25-maint/Modules/cPickle.c Log: 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. Modified: python/branches/release25-maint/Modules/cPickle.c ============================================================================== --- python/branches/release25-maint/Modules/cPickle.c (original) +++ python/branches/release25-maint/Modules/cPickle.c Fri Oct 5 07:05:24 2007 @@ -2249,7 +2249,7 @@ 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;
participants (1)
-
neal.norwitz