Skip to content

Commit

Permalink
Merge pull request #1528 from rouault/fix_ossfuzz_68763
Browse files Browse the repository at this point in the history
opj_j2k_decode_tiles(): avoid use of uninitialized l_current_tile_no variable
  • Loading branch information
rouault authored Jun 14, 2024
2 parents c456f08 + 3b0c9b9 commit 1bca4d2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/lib/openjp2/j2k.c
Original file line number Diff line number Diff line change
Expand Up @@ -11703,8 +11703,9 @@ static OPJ_BOOL opj_j2k_decode_tiles(opj_j2k_t *p_j2k,
return OPJ_FALSE;
}

if (! opj_j2k_decode_tile(p_j2k, l_current_tile_no, NULL, 0,
p_stream, p_manager)) {
if (!l_go_on ||
! opj_j2k_decode_tile(p_j2k, l_current_tile_no, NULL, 0,
p_stream, p_manager)) {
opj_event_msg(p_manager, EVT_ERROR, "Failed to decode tile 1/1\n");
return OPJ_FALSE;
}
Expand Down

0 comments on commit 1bca4d2

Please sign in to comment.