assert memcpy on NULL in ht_dec.c opj_t1_ht_decode_cblk

This commit is contained in:
Paul Dreik 2022-08-25 08:40:25 +02:00
parent 4e7a8d0aff
commit b5ed4a189a
1 changed files with 1 additions and 0 deletions

View File

@ -1192,6 +1192,7 @@ OPJ_BOOL opj_t1_ht_decode_cblk(opj_t1_t *t1,
cblkdata = t1->cblkdatabuffer;
cblk_len = 0;
for (i = 0; i < cblk->numchunks; i++) {
assert(cblkdata!=NULL && "memcpy on NULL is undefined behaviour");
memcpy(cblkdata + cblk_len, cblk->chunks[i].data, cblk->chunks[i].len);
cblk_len += cblk->chunks[i].len;
}