diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2024-11-13 17:48:49 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-11-13 17:48:49 +0100 |
| commit | 05de3bfdfed79f4e56d041bb970c5ec4f4c84716 (patch) | |
| tree | d5db946febc97576ae8d9abb5c006aa18a8b18a3 | |
| parent | 4ec0aca4d733a852186bbce82e58043095a372d4 (diff) | |
| parent | c34e44120d760506b1bfee58acca505b4cab0d84 (diff) | |
Merge pull request #1561 from rouault/fix_pr_1530
Amend fix of PR 1530 regarding m_sot_length check
| -rw-r--r-- | src/lib/openjp2/j2k.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lib/openjp2/j2k.c b/src/lib/openjp2/j2k.c index 7dc389fa..dfa51e5f 100644 --- a/src/lib/openjp2/j2k.c +++ b/src/lib/openjp2/j2k.c @@ -9792,7 +9792,8 @@ OPJ_BOOL opj_j2k_read_tile_header(opj_j2k_t * p_j2k, } /* Why this condition? FIXME */ - if (p_j2k->m_specific_param.m_decoder.m_state & J2K_STATE_TPH) { + if ((p_j2k->m_specific_param.m_decoder.m_state & J2K_STATE_TPH) && + p_j2k->m_specific_param.m_decoder.m_sot_length != 0) { if (p_j2k->m_specific_param.m_decoder.m_sot_length < l_marker_size + 2) { opj_event_msg(p_manager, EVT_ERROR, "Sot length is less than marker size + marker ID\n"); |
