shithub: jbig2

Download patch

ref: 4b0abdb8ec3a5ec6bf99c6bcfe2b4c5b742c29e8
parent: e7362ca3d9430c1643f59c0d04cd6cf41d26746c
author: Sebastian Rasmussen <sebras@gmail.com>
date: Sat Mar 21 14:08:43 EDT 2020

jbig2dec: Cast literal to avoid shifting outside of valid range.

Fixes Coverity CID 355175.

--- a/jbig2_arith_iaid.c
+++ b/jbig2_arith_iaid.c
@@ -53,7 +53,7 @@
         return NULL;
     }
 
-    ctx_size = 1U << SBSYMCODELEN;
+    ctx_size = (size_t) 1U << SBSYMCODELEN;
 
     result = jbig2_new(ctx, Jbig2ArithIaidCtx, 1);
     if (result == NULL) {