summaryrefslogtreecommitdiffstats
path: root/Python/marshal.c
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2013-10-31 16:07:08 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2013-10-31 16:07:08 (GMT)
commitb1b7b1834b5b5dd989b0295a3be3401569714ccc (patch)
tree2347521b4013eb3b01dcdadf333dd4754707d9c7 /Python/marshal.c
parent763b0d19c94b59b37fa140b8c578f141422e0d25 (diff)
downloadcpython-b1b7b1834b5b5dd989b0295a3be3401569714ccc.zip
cpython-b1b7b1834b5b5dd989b0295a3be3401569714ccc.tar.gz
cpython-b1b7b1834b5b5dd989b0295a3be3401569714ccc.tar.bz2
Issue #19437: Fix r_object() of marshal module, handle r_byte() failure for
TYPE_SMALL_TUPLE
Diffstat (limited to 'Python/marshal.c')
-rw-r--r--Python/marshal.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/Python/marshal.c b/Python/marshal.c
index 411f1e0..598269f 100644
--- a/Python/marshal.c
+++ b/Python/marshal.c
@@ -1101,6 +1101,8 @@ r_object(RFILE *p)
case TYPE_SMALL_TUPLE:
n = (unsigned char) r_byte(p);
+ if (PyErr_Occurred())
+ break;
goto _read_tuple;
case TYPE_TUPLE:
n = r_long(p);