summaryrefslogtreecommitdiff
path: root/source/pdf/pdf-object.c
diff options
context:
space:
mode:
authorRobin Watts <robin.watts@artifex.com>2016-06-18 15:58:52 +0100
committerRobin Watts <robin.watts@artifex.com>2016-06-20 12:32:55 +0100
commitcc4c0e6c87bbefa9d0b5786cebd2f7362e307acd (patch)
treee05bdd5c2a5768c39682b161c6ddac60b6628c6e /source/pdf/pdf-object.c
parenta47aaea48a1cd60d0db3338addb18197997bb7e9 (diff)
downloadmupdf-cc4c0e6c87bbefa9d0b5786cebd2f7362e307acd.tar.xz
Fix signed/unsigned warning.
Diffstat (limited to 'source/pdf/pdf-object.c')
-rw-r--r--source/pdf/pdf-object.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/pdf/pdf-object.c b/source/pdf/pdf-object.c
index b9076dc8..176b0933 100644
--- a/source/pdf/pdf-object.c
+++ b/source/pdf/pdf-object.c
@@ -364,7 +364,7 @@ void pdf_set_str_len(fz_context *ctx, pdf_obj *obj, int newlen)
RESOLVE(obj);
if (obj < PDF_OBJ__LIMIT || obj->kind != PDF_STRING)
return; /* This should never happen */
- if (newlen > STRING(obj)->len)
+ if (newlen < 0 || (unsigned int)newlen > STRING(obj)->len)
return; /* This should never happen */
STRING(obj)->len = newlen;
}