[jbig2-cvs] rev 464 - trunk

giles at ghostscript.com giles at ghostscript.com
Fri May 9 06:54:33 PDT 2008


Author: giles
Date: 2008-05-09 06:54:32 -0700 (Fri, 09 May 2008)
New Revision: 464

Modified:
   trunk/jbig2_text.c
Log:
Runcodes 33 and 34 repeat a zero code length symbol id, not the previous
symbol like runcode 32.

Thanks to Justin Greer for the fix. Ghostscript bug 689824.


Modified: trunk/jbig2_text.c
===================================================================
--- trunk/jbig2_text.c	2008-05-09 13:41:01 UTC (rev 463)
+++ trunk/jbig2_text.c	2008-05-09 13:54:32 UTC (rev 464)
@@ -147,7 +147,11 @@
 	      /* todo: memory cleanup */
 	      return -1;
 	    }
-	    len = symcodelengths[index-1].PREFLEN;
+	    if (code == 32) {
+	      len = symcodelengths[index-1].PREFLEN;
+	    } else {
+	      len = 0; /* code == 33 or 34 */
+	    }
 	    if (code == 32) range = jbig2_huffman_get_bits(hs, 2) + 3;
 	    else if (code == 33) range = jbig2_huffman_get_bits(hs, 3) + 3;
 	    else if (code == 34) range = jbig2_huffman_get_bits(hs, 7) + 11;



More information about the jbig2-cvs mailing list