Skip to content

Commit 2861261

Browse files
author
Marius Herzog
committed
Fix parser hang when EOC marker appears before any SOT marker
1 parent 1ad9bec commit 2861261

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/lib/openjp2/j2k.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1420,6 +1420,7 @@ static const opj_dec_memory_marker_handler_t j2k_memory_marker_handler_tab [] =
14201420
{J2K_MS_PLT, J2K_STATE_TPH, opj_j2k_read_plt},
14211421
{J2K_MS_PPM, J2K_STATE_MH, opj_j2k_read_ppm},
14221422
{J2K_MS_PPT, J2K_STATE_TPH, opj_j2k_read_ppt},
1423+
{J2K_MS_EOC, J2K_STATE_EOC, 0},
14231424
{J2K_MS_SOP, 0, 0},
14241425
{J2K_MS_CRG, J2K_STATE_MH, opj_j2k_read_crg},
14251426
{J2K_MS_COM, J2K_STATE_MH | J2K_STATE_TPH, opj_j2k_read_com},

0 commit comments

Comments
 (0)