diff options
| author | Mathieu Malaterre <mathieu.malaterre@gmail.com> | 2014-03-18 14:43:18 +0000 |
|---|---|---|
| committer | Mathieu Malaterre <mathieu.malaterre@gmail.com> | 2014-03-18 14:43:18 +0000 |
| commit | 008de865337989c00879e32f23c8259c1be31d00 (patch) | |
| tree | b21a49958b47b9f32e9f322dabec7ad584748781 /src/lib | |
| parent | ae49fd1aa9ef6409d958255c1461a8222e2a9ae4 (diff) | |
[trunk] Import git commit 99a6f1af177c15f4db475186b79d169c993494ef from ghostscript team
Update issue 296
Diffstat (limited to 'src/lib')
| -rw-r--r-- | src/lib/openjp2/t2.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/lib/openjp2/t2.c b/src/lib/openjp2/t2.c index 82d7a78f..253d14f8 100644 --- a/src/lib/openjp2/t2.c +++ b/src/lib/openjp2/t2.c @@ -855,8 +855,12 @@ OPJ_BOOL opj_t2_read_packet_header( opj_t2_t* p_t2, /* SOP markers */ if (p_tcp->csty & J2K_CP_CSTY_SOP) { - if ((*l_current_data) != 0xff || (*(l_current_data + 1) != 0x91)) { - /* TODO opj_event_msg(t2->cinfo->event_mgr, EVT_WARNING, "Expected SOP marker\n"); */ + if (p_max_length < 6) { + /* TODO opj_event_msg(p_t2->cinfo->event_mgr, EVT_WARNING, "Not enough space for expected SOP marker\n"); */ + printf("Not enough space for expected SOP marker\n"); + } else if ((*l_current_data) != 0xff || (*(l_current_data + 1) != 0x91)) { + /* TODO opj_event_msg(p_t2->cinfo->event_mgr, EVT_WARNING, "Expected SOP marker\n"); */ + printf("Expected SOP marker\n"); fprintf(stderr, "Error : expected SOP marker\n"); } else { l_current_data += 6; |
