summaryrefslogtreecommitdiff
path: root/source/pdf
diff options
context:
space:
mode:
Diffstat (limited to 'source/pdf')
-rw-r--r--source/pdf/pdf-xref.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/pdf/pdf-xref.c b/source/pdf/pdf-xref.c
index f2ba5a5d..392adf33 100644
--- a/source/pdf/pdf-xref.c
+++ b/source/pdf/pdf-xref.c
@@ -748,8 +748,8 @@ pdf_xref_size_from_old_trailer(fz_context *ctx, pdf_document *doc, pdf_lexbuf *b
trailer = pdf_parse_dict(ctx, doc, doc->file, buf);
size = pdf_to_int(ctx, pdf_dict_get(ctx, trailer, PDF_NAME_Size));
- if (!size)
- fz_throw(ctx, FZ_ERROR_GENERIC, "trailer missing Size entry");
+ if (size < 0 || size > PDF_MAX_OBJECT_NUMBER + 1)
+ fz_throw(ctx, FZ_ERROR_GENERIC, "trailer Size entry out of range");
}
fz_always(ctx)
{