shithub: jbig2

Download patch

ref: 7ce709fca233bb6a189ee36408cf4920309bb082
parent: 11b4c3203dc5a9551720760570c82408c303cd1c
author: Simon Bünzli <zeniko@gmail.com>
date: Sat Sep 27 09:51:32 EDT 2014

Bug 694892: fix typo in 5eaf740b2c02523ae2ae6454e546cb6700d4e3f3

Signed-off-by: Henry Stiles <henry.stiles@artifex.com>

--- a/jbig2_metadata.c
+++ b/jbig2_metadata.c
@@ -134,10 +134,10 @@
     /* loop over the segment data pulling out the key,value pairs */
     while (s < end && *s) {
         key = s;
-        value = memchr(key, '0', end - key);
+        value = memchr(key, '\0', end - key);
         if (!value) goto too_short;
         value++;
-        s = memchr(value, '0', end - value);
+        s = memchr(value, '\0', end - value);
         if (!s) goto too_short;
         s++;
         jbig2_metadata_add(ctx, comment, key, value - key, value, s - value);