From 27269d493d66e16bfd7a5b5a0b09c4f21693260b Mon Sep 17 00:00:00 2001 From: Robin Watts Date: Fri, 17 Jun 2016 13:44:03 +0100 Subject: Allow PDF strings to be > 16bits. This stops Bug693111.pdf giving errors. --- source/pdf/pdf-object.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source') diff --git a/source/pdf/pdf-object.c b/source/pdf/pdf-object.c index fcb9f328..b9076dc8 100644 --- a/source/pdf/pdf-object.c +++ b/source/pdf/pdf-object.c @@ -48,7 +48,7 @@ typedef struct pdf_obj_num_s typedef struct pdf_obj_string_s { pdf_obj super; - unsigned short len; + unsigned int len; char buf[1]; } pdf_obj_string; @@ -145,7 +145,7 @@ pdf_obj * pdf_new_string(fz_context *ctx, pdf_document *doc, const char *str, size_t len) { pdf_obj_string *obj; - unsigned short l = (unsigned short)len; + unsigned int l = (unsigned int)len; if ((size_t)l != len) fz_throw(ctx, FZ_ERROR_GENERIC, "Overflow in pdf string"); -- cgit v1.2.3