ref: 28e7ac27b12c59c271eacca8eb70dc97fe991c5b
parent: a065bcb4b13998d875073212087b2a84aa132cc7
author: giles <giles@ded80894-8fb9-0310-811b-c03f3676ab4d>
date: Mon Dec 13 15:00:09 EST 2004
Fix and error return. The normal 'return jbig2_error(ctx, JBIG2_SEVERITY_FATAL,...)' idiom doesn't work when the function returns a pointer instead of an error code. git-svn-id: http://svn.ghostscript.com/jbig2dec/trunk@366 ded80894-8fb9-0310-811b-c03f3676ab4d
--- a/jbig2_symbol_dict.c
+++ b/jbig2_symbol_dict.c
@@ -387,9 +387,12 @@
code = jbig2_arith_int_decode(IARDY, as, &RDY);
}
- if (ID >= ninsyms+NSYMSDECODED)
- return jbig2_error(ctx, JBIG2_SEVERITY_FATAL, segment->number,
+
+ if (ID >= ninsyms+NSYMSDECODED) {
+ jbig2_error(ctx, JBIG2_SEVERITY_FATAL, segment->number,
"refinement references unknown symbol %d", ID);
+ return NULL;
+ }
jbig2_error(ctx, JBIG2_SEVERITY_DEBUG, segment->number,
"symbol is a refinement of id %d with the refinement applied at (%d,%d)",