Skip to content

Commit

Permalink
opj_j2k_decode_tiles(): avoid use of uninitialized l_current_tile_no …
Browse files Browse the repository at this point in the history
  • Loading branch information
rouault committed May 6, 2024
1 parent 761e49c commit 3b0c9b9
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 @@ -11698,8 +11698,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 3b0c9b9

Please sign in to comment.