ref: ae98887d657761ac4d15881da559bb9ae24f26e7
parent: ea866acb21033fd3cfe345352852ea1202ce2e32
author: Henry Stiles <henry.stiles@artifex.com>
date: Wed May 11 11:18:11 EDT 2011
Fixes 690889, potential null dereference. Prevent a theoretical (no test file) null dereference. There are several of these cases identified by by static analysis. We believe the authors intent was to pass the word stream if the arithmetic state was not set, as in the other call of the same function.
--- a/jbig2_symbol_dict.c
+++ b/jbig2_symbol_dict.c
@@ -480,7 +480,7 @@
/* multiple symbols are handled as a text region */
jbig2_decode_text_region(ctx, segment, tparams, (const Jbig2SymbolDict * const *)refagg_dicts,
- n_refagg_dicts, image, data, size, GR_stats, as, (Jbig2WordStream *)NULL);
+ n_refagg_dicts, image, data, size, GR_stats, as, as ? NULL : ws);
SDNEWSYMS->glyphs[NSYMSDECODED] = image;
refagg_dicts[0]->glyphs[params->SDNUMINSYMS + NSYMSDECODED] = jbig2_image_clone(ctx, SDNEWSYMS->glyphs[NSYMSDECODED]);