Revert "Avoid assertion in opj_j2k_merge_ppt() in case premature EOC is encountered in opj_j2k_read_tile_header(). Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2785. Credit to OSS Fuzz" (fixes #1120)

This reverts commit 9906fbf737.
which broke decoding of images where TNsot == 0
This commit is contained in:
Even Rouault 2018-06-20 14:38:41 +02:00
parent fd205f457b
commit 832dfd1866
No known key found for this signature in database
GPG Key ID: 33EBBFC47B3DD87D
1 changed files with 4 additions and 1 deletions

View File

@ -8845,7 +8845,10 @@ OPJ_BOOL opj_j2k_read_tile_header(opj_j2k_t * p_j2k,
/* Current marker is the EOC marker ?*/ /* Current marker is the EOC marker ?*/
if (l_current_marker == J2K_MS_EOC) { if (l_current_marker == J2K_MS_EOC) {
p_j2k->m_specific_param.m_decoder.m_state = J2K_STATE_EOC; if (p_j2k->m_specific_param.m_decoder.m_state != J2K_STATE_EOC) {
p_j2k->m_current_tile_number = 0;
p_j2k->m_specific_param.m_decoder.m_state = J2K_STATE_EOC;
}
} }
/* FIXME DOC ???*/ /* FIXME DOC ???*/