shithub: jbig2

Download patch

ref: 017f11f142bdea0965f453d64a31ef02b3271cba
parent: 90f453a7ea397418ed33966e6b94650efd99284f
author: Shailesh Mistry <shailesh.mistry@hotmail.co.uk>
date: Thu May 31 13:51:51 EDT 2012

Bug 693025: Correct typos reported by Zeniko

--- a/jbig2_huffman.c
+++ b/jbig2_huffman.c
@@ -253,7 +253,7 @@
       entry = &table->entries[this_word >> (32 - log_table_size)];
       flags = entry->flags;
       PREFLEN = entry->PREFLEN;
-      if ((flags == (byte)-1) && (PREFLEN == (int)-1) && (entry->u.RANGELOW == -1))
+      if ((flags == (byte)-1) && (PREFLEN == (byte)-1) && (entry->u.RANGELOW == -1))
       {
           if (oob)
               *oob = -1;
--- a/jbig2_symbol_dict.c
+++ b/jbig2_symbol_dict.c
@@ -801,7 +801,7 @@
 
 cleanup2:
   jbig2_sd_release(ctx, SDNEWSYMS);
-  if (params->SDHUFF && params->SDREFAGG)
+  if (params->SDHUFF && !params->SDREFAGG)
   {
       jbig2_free(ctx->allocator, SDNEWSYMWIDTHS);
   }