summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorTor Andersson <tor.andersson@artifex.com>2017-03-28 16:21:32 +0200
committerTor Andersson <tor.andersson@artifex.com>2017-03-28 16:21:44 +0200
commit5f75285d8cadcc35e51f84bdbbffd6d0abdab6d5 (patch)
tree05eb8883fa7dd313227b5916466f4121f62f790c /source
parent902250d9546c65824c4f804a1527dc471b781f93 (diff)
downloadmupdf-5f75285d8cadcc35e51f84bdbbffd6d0abdab6d5.tar.xz
pdf: Swallow unrecoverable errors and ignore rest of page.
Diffstat (limited to 'source')
-rw-r--r--source/pdf/pdf-interpret.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/source/pdf/pdf-interpret.c b/source/pdf/pdf-interpret.c
index 5d8e6025..8d2f6c57 100644
--- a/source/pdf/pdf-interpret.c
+++ b/source/pdf/pdf-interpret.c
@@ -993,7 +993,8 @@ pdf_process_stream(fz_context *ctx, pdf_processor *proc, pdf_csi *csi, fz_stream
else
{
cookie->errors++;
- fz_rethrow(ctx);
+ fz_warn(ctx, "unrecoverable error; ignoring rest of page");
+ tok = PDF_TOK_EOF;
}
}
else
@@ -1011,7 +1012,10 @@ pdf_process_stream(fz_context *ctx, pdf_processor *proc, pdf_csi *csi, fz_stream
}
}
else
- fz_rethrow(ctx);
+ {
+ fz_warn(ctx, "unrecoverable error; ignoring rest of page");
+ tok = PDF_TOK_EOF;
+ }
}
/* If we do catch an error, then reset ourselves to a base lexing state */