summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorTor Andersson <tor.andersson@artifex.com>2015-09-25 15:43:04 +0200
committerTor Andersson <tor.andersson@artifex.com>2015-09-25 15:57:07 +0200
commit7723a3f3914928701efc81e515fd2df1d7158d3b (patch)
treedec019a37ba5fc7a57cd049ed716d2b9a0bdc536 /source
parent4d1dcf7649bc37535870ac38e958b27c44576fb3 (diff)
downloadmupdf-7723a3f3914928701efc81e515fd2df1d7158d3b.tar.xz
Abort repairing if we cannot find any objects.
Diffstat (limited to 'source')
-rw-r--r--source/pdf/pdf-repair.c3
1 files changed, 3 insertions, 0 deletions
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 */
/*