shithub: jbig2

Download patch

ref: 873e64587d5dbed43e79c8b4fac13add7967de31
parent: e8f1a6cc38bac9b1b132a0641fa858965b39af28
author: Sebastian Rasmussen <[email protected]>
date: Fri Aug 3 15:14:15 EDT 2018

jbig2dec: Avoid accessing symbol bitmap width if it is missing.

--- a/jbig2_text.c
+++ b/jbig2_text.c
@@ -457,9 +457,9 @@
             }
 
             /* (3c.vi) */
-            if ((!params->TRANSPOSED) && (params->REFCORNER > 1)) {
+            if ((!params->TRANSPOSED) && (params->REFCORNER > 1) && IB) {
                 CURS += IB->width - 1;
-            } else if ((params->TRANSPOSED) && !(params->REFCORNER & 1)) {
+            } else if ((params->TRANSPOSED) && !(params->REFCORNER & 1) && IB) {
                 CURS += IB->height - 1;
             }