From: Even Rouault Date: Thu, 21 Sep 2017 12:10:49 +0000 (+0200) Subject: Workaround Coverity CID 169392 X-Git-Tag: v2.3.0~13 X-Git-Url: https://git.carlh.net/gitweb/?a=commitdiff_plain;h=7711307d865d46ca1bb8bb152071178b10066d05;p=openjpeg.git Workaround Coverity CID 169392 --- diff --git a/src/lib/openjp2/t1.c b/src/lib/openjp2/t1.c index 9609895d..76744380 100644 --- a/src/lib/openjp2/t1.c +++ b/src/lib/openjp2/t1.c @@ -1999,6 +1999,10 @@ static OPJ_BOOL opj_t1_decode_cblk(opj_t1_t *t1, } } else if (cblk->numchunks == 1) { cblkdata = cblk->chunks[0].data; + } else { + /* Not sure if that can happen in practice, but avoid Coverity to */ + /* think we will dereference a null cblkdta pointer */ + return OPJ_TRUE; } /* For subtile decoding, directly decode in the decoded_data buffer of */