]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Issue #19437: Fix _pickle, don't call _Unpickler_SkipConsumed() with an
authorVictor Stinner <victor.stinner@gmail.com>
Thu, 31 Oct 2013 12:39:23 +0000 (13:39 +0100)
committerVictor Stinner <victor.stinner@gmail.com>
Thu, 31 Oct 2013 12:39:23 +0000 (13:39 +0100)
exception set

Modules/_pickle.c

index f837264cae1286fb447299554872252893d9b452..a14a258fec7a26726ed176b05db3b73068b174d5 100644 (file)
@@ -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;
 }