summaryrefslogtreecommitdiff
path: root/Python/marshal.c
diff options
context:
space:
mode:
Diffstat (limited to 'Python/marshal.c')
-rw-r--r--Python/marshal.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/Python/marshal.c b/Python/marshal.c
index 96c530a78a..48612b094e 100644
--- a/Python/marshal.c
+++ b/Python/marshal.c
@@ -406,6 +406,10 @@ rd_object(fp)
FILE *fp;
{
RFILE rf;
+ if (err_occurred()) {
+ fprintf(stderr, "XXX rd_object called with exception set\n");
+ return NULL;
+ }
rf.fp = fp;
return r_object(&rf);
}
@@ -416,6 +420,10 @@ rds_object(str, len)
int len;
{
RFILE rf;
+ if (err_occurred()) {
+ fprintf(stderr, "XXX rds_object called with exception set\n");
+ return NULL;
+ }
rf.fp = NULL;
rf.str = NULL;
rf.ptr = str;