rev 466 - trunk
[email protected] Fri, 16 May 2008 16:58:59 -0700 (PDT)
| Newsgroups | gmane.comp.printing.ghostscript.jbig2dec.cvs |
|---|---|
| Message-ID | <[email protected]> |
Author: giles
Date: 2008-05-16 16:58:59 -0700 (Fri, 16 May 2008)
New Revision: 466
Modified:
trunk/jbig2_text.c
Log:
Only check for a code length antecedent under RUNCODE32. RUNCODE33 and=20
RUNCODE34 specify a repeat of zero so a previous code length isn't=20
necessary.
Thanks to Justin Greer for catching this. Ghostscript bug 689835.
Modified: trunk/jbig2_text.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/jbig2_text.c 2008-05-16 23:48:20 UTC (rev 465)
+++ trunk/jbig2_text.c 2008-05-16 23:58:59 UTC (rev 466)
@@ -141,14 +141,14 @@
len =3D code;
range =3D 1;
} else {
- if (index < 1) {
- jbig2_error(ctx, JBIG2_SEVERITY_FATAL, segment->number,
- "error decoding symbol id table: run length with no antecedent!");
- /* todo: memory cleanup */
- return -1;
- }
if (code =3D=3D 32) {
len =3D symcodelengths[index-1].PREFLEN;
+ if (index < 1) {
+ jbig2_error(ctx, JBIG2_SEVERITY_FATAL, segment->number,
+ "error decoding symbol id table: run length with no antecedent!");
+ /* todo: memory cleanup */
+ return -1;
+ }
} else {
len =3D 0; /* code =3D=3D 33 or 34 */
}