diff --git a/src/lib/openjp2/j2k.c b/src/lib/openjp2/j2k.c index 68cbca318..e244362ba 100644 --- a/src/lib/openjp2/j2k.c +++ b/src/lib/openjp2/j2k.c @@ -4906,9 +4906,8 @@ static OPJ_BOOL opj_j2k_read_sod(opj_j2k_t *p_j2k, /* Check enough bytes left in stream before allocation */ if ((OPJ_OFF_T)p_j2k->m_specific_param.m_decoder.m_sot_length > opj_stream_get_number_byte_left(p_stream)) { - opj_event_msg(p_manager, EVT_ERROR, + opj_event_msg(p_manager, EVT_WARNING, "Tile part length size inconsistent with stream length\n"); - //return OPJ_FALSE; } if (p_j2k->m_specific_param.m_decoder.m_sot_length > UINT_MAX - OPJ_COMMON_CBLK_DATA_EXTRA) { diff --git a/src/lib/openjp2/t2.c b/src/lib/openjp2/t2.c index 723ef970c..f4c6714ca 100644 --- a/src/lib/openjp2/t2.c +++ b/src/lib/openjp2/t2.c @@ -1397,13 +1397,10 @@ static OPJ_BOOL opj_t2_read_packet_data(opj_t2_t* p_t2, (OPJ_SIZE_T)l_current_data) || (l_current_data + l_seg->newlen > p_src_data + p_max_length) || (partial_buffer)) { - opj_event_msg(p_manager, EVT_ERROR, + opj_event_msg(p_manager, EVT_WARNING, "read: segment too long (%d) with max (%d) for codeblock %d (p=%d, b=%d, r=%d, c=%d)\n", l_seg->newlen, p_max_length, cblkno, p_pi->precno, bandno, p_pi->resno, p_pi->compno); - // NOTE - originall we would return OPJ_FALSE here when we encountered partial bitstream - //return OPJ_FALSE; - // skip this codeblock since it is a partial read partial_buffer = 1; l_cblk->numchunks = 0;