summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorTor Andersson <tor.andersson@artifex.com>2014-05-28 14:29:44 +0200
committerTor Andersson <tor.andersson@artifex.com>2014-05-29 01:23:55 +0200
commit68b6b1ea0ec475bcf1fe706dd4ed06b96ebe9f28 (patch)
tree2815f77c4dbc221345f7caf1f0c6b4fdc96cd385 /source
parente7bd6babd4b6567db153806eb928591f2b26f4e2 (diff)
downloadmupdf-68b6b1ea0ec475bcf1fe706dd4ed06b96ebe9f28.tar.xz
Tolerate zero-sized xref sections...
...like the one Microsoft Word generates.
Diffstat (limited to 'source')
-rw-r--r--source/pdf/pdf-xref.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/pdf/pdf-xref.c b/source/pdf/pdf-xref.c
index 134d72cc..57189ce4 100644
--- a/source/pdf/pdf-xref.c
+++ b/source/pdf/pdf-xref.c
@@ -374,7 +374,7 @@ pdf_xref_size_from_old_trailer(pdf_document *doc, pdf_lexbuf *buf)
if (!s)
fz_throw(doc->ctx, FZ_ERROR_GENERIC, "invalid range marker in xref");
len = fz_atoi(fz_strsep(&s, " "));
- if (len <= 0)
+ if (len < 0)
fz_throw(doc->ctx, FZ_ERROR_GENERIC, "xref range marker must be positive");
/* broken pdfs where the section is not on a separate line */