summaryrefslogtreecommitdiff
path: root/pdf
diff options
context:
space:
mode:
Diffstat (limited to 'pdf')
-rw-r--r--pdf/pdf_xref.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/pdf/pdf_xref.c b/pdf/pdf_xref.c
index e0e9f190..ffdc435e 100644
--- a/pdf/pdf_xref.c
+++ b/pdf/pdf_xref.c
@@ -1050,7 +1050,10 @@ pdf_resolve_indirect(pdf_obj *ref)
while (pdf_is_indirect(ref))
{
if (--sanity == 0)
- fz_throw(ctx, "Too many indirections (possible indirection cycle involving %d %d R)", num, gen);
+ {
+ fz_warn(ctx, "Too many indirections (possible indirection cycle involving %d %d R)", num, gen);
+ return NULL;
+ }
xref = pdf_get_indirect_document(ref);
if (!xref)
return NULL;