From 7723a3f3914928701efc81e515fd2df1d7158d3b Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Fri, 25 Sep 2015 15:43:04 +0200 Subject: Abort repairing if we cannot find any objects. --- source/pdf/pdf-repair.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'source') diff --git a/source/pdf/pdf-repair.c b/source/pdf/pdf-repair.c index 0f20d3f2..6e62bf00 100644 --- a/source/pdf/pdf-repair.c +++ b/source/pdf/pdf-repair.c @@ -458,6 +458,9 @@ pdf_repair_xref(fz_context *ctx, pdf_document *doc) } + if (listlen == 0) + fz_throw(ctx, FZ_ERROR_GENERIC, "no objects found"); + /* make xref reasonable */ /* -- cgit v1.2.3