summaryrefslogtreecommitdiff
path: root/gs/jbig2dec
diff options
context:
space:
mode:
authorMasaki Ushizaka <masaki.ushizaka@artifex.com>2010-04-21 07:20:14 +0000
committerMasaki Ushizaka <masaki.ushizaka@artifex.com>2010-04-21 07:20:14 +0000
commitd0b31d8d649cd997a5b6ea5d0a868002af3e492f (patch)
treef12686d7e975befcd32fde3fb14c5470da5d5b04 /gs/jbig2dec
parent2e27bedf8e5a48546cc2088b40ee2d904a56335d (diff)
A fix for a regression introduced by r11074 (bug 690094).
As I changed image number to be incremented when 'exflag' is false, the problem of 'exrunlength' when SDHUFF == 1 was unveiled. This fixes it. JBIG2 images with SDHUFF == 1 should have been having trouble between r11074 and this revision. No other difference expected. git-svn-id: http://svn.ghostscript.com/ghostscript/trunk@11093 a1074d23-0009-0410-80fe-cf8c14f379e6
Diffstat (limited to 'gs/jbig2dec')
-rw-r--r--gs/jbig2dec/jbig2_symbol_dict.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gs/jbig2dec/jbig2_symbol_dict.c b/gs/jbig2dec/jbig2_symbol_dict.c
index 2ec101503..904e7af19 100644
--- a/gs/jbig2dec/jbig2_symbol_dict.c
+++ b/gs/jbig2dec/jbig2_symbol_dict.c
@@ -693,7 +693,7 @@ jbig2_decode_symbol_dict(Jbig2Ctx *ctx,
while (j < params->SDNUMEXSYMS) {
if (params->SDHUFF)
/* FIXME: implement reading from huff table B.1 */
- exrunlength = params->SDNUMEXSYMS;
+ exrunlength = exflag ? params->SDNUMEXSYMS : 0;
else
code = jbig2_arith_int_decode(IAEX, as, &exrunlength);
if (exflag && exrunlength > params->SDNUMEXSYMS - j) {