shithub: jbig2

Download patch

ref: e13fd4acd3bc4c692b09467e7bbd5430811e4570
parent: 5885ff7ba373bc00d47064617a8c8a9c0d5d30ec
author: Robin Watts <[email protected]>
date: Mon Dec 16 07:34:26 EST 2013

Bug 694845: Shailesh Mistrys patch for regression in jbig2dec

Having reverted the problematic patch, this is the fixed version.

--- a/jbig2_symbol_dict.c
+++ b/jbig2_symbol_dict.c
@@ -157,6 +157,7 @@
         rsegment = jbig2_find_segment(ctx, segment->referred_to_segments[index]);
         if (rsegment && ((rsegment->flags & 63) == 0) &&
             rsegment->result &&
+            (((Jbig2SymbolDict *)rsegment->result)->n_symbols > 0) &&
             ((*((Jbig2SymbolDict *)rsegment->result)->glyphs) != NULL))
             n_dicts++;
     }