Skip to content

Commit

Permalink
opj_t1_decode_cblk(): detech unsigned-interger-overflow at t1.c:1989 (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
headshog authored and rouault committed Dec 8, 2023
1 parent 6af3931 commit 1a18251
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/lib/openjp2/t1.c
Original file line number Diff line number Diff line change
Expand Up @@ -1987,6 +1987,9 @@ static OPJ_BOOL opj_t1_decode_cblk(opj_t1_t *t1,
}

bpno_plus_one = (OPJ_INT32)(roishift + cblk->numbps);
if ((OPJ_UINT32)bpno_plus_one < cblk->numbps) {
return OPJ_FALSE;
}
if (bpno_plus_one >= 31) {
if (p_manager_mutex) {
opj_mutex_lock(p_manager_mutex);
Expand Down

0 comments on commit 1a18251

Please sign in to comment.