From: Victor Stinner Date: Thu, 31 Oct 2013 12:39:23 +0000 (+0100) Subject: Issue #19437: Fix _pickle, don't call _Unpickler_SkipConsumed() with an X-Git-Tag: v3.4.0b1~456 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=2ae57e3cf8b038d545b67db3c82678e325ac2a41;p=thirdparty%2FPython%2Fcpython.git Issue #19437: Fix _pickle, don't call _Unpickler_SkipConsumed() with an exception set --- diff --git a/Modules/_pickle.c b/Modules/_pickle.c index f837264cae12..a14a258fec7a 100644 --- a/Modules/_pickle.c +++ b/Modules/_pickle.c @@ -5430,9 +5430,6 @@ load(UnpicklerObject *self) break; /* and we are done! */ } - if (_Unpickler_SkipConsumed(self) < 0) - return NULL; - /* XXX: It is not clear what this is actually for. */ if ((err = PyErr_Occurred())) { if (err == PyExc_EOFError) { @@ -5441,6 +5438,9 @@ load(UnpicklerObject *self) return NULL; } + if (_Unpickler_SkipConsumed(self) < 0) + return NULL; + PDATA_POP(self->stack, value); return value; }