summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorTor Andersson <tor.andersson@artifex.com>2017-10-16 13:14:40 +0200
committerTor Andersson <tor.andersson@artifex.com>2017-10-16 14:36:28 +0200
commit8080868ad41df95ba376bd451612fcb23a4a3daf (patch)
tree8aae1c606702cf5acdff63e090b76ee1b0c083cf /source
parent82df2631d7d0446b206ea6b434ea609b6c28b0e8 (diff)
downloadmupdf-8080868ad41df95ba376bd451612fcb23a4a3daf.tar.xz
Print warning when PDF version number is not a known version.
Diffstat (limited to 'source')
-rw-r--r--source/pdf/pdf-xref.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/source/pdf/pdf-xref.c b/source/pdf/pdf-xref.c
index 62927936..92ccf34e 100644
--- a/source/pdf/pdf-xref.c
+++ b/source/pdf/pdf-xref.c
@@ -594,6 +594,9 @@ pdf_load_version(fz_context *ctx, pdf_document *doc)
fz_throw(ctx, FZ_ERROR_GENERIC, "cannot recognize version marker");
doc->version = 10 * (fz_atof(buf+5) + 0.05f);
+ if (doc->version < 10 || doc->version > 17)
+ if (doc->version != 20)
+ fz_warn(ctx, "unknown PDF version: %d.%d", doc->version / 10, doc->version % 10);
}
static void