changed ERROR->WARNING for log messages

This commit is contained in:
Chris Hafey 2020-05-20 19:09:15 +00:00
parent e984e13bd6
commit 746bd45290
2 changed files with 2 additions and 6 deletions

View File

@ -4906,9 +4906,8 @@ static OPJ_BOOL opj_j2k_read_sod(opj_j2k_t *p_j2k,
/* Check enough bytes left in stream before allocation */ /* Check enough bytes left in stream before allocation */
if ((OPJ_OFF_T)p_j2k->m_specific_param.m_decoder.m_sot_length > if ((OPJ_OFF_T)p_j2k->m_specific_param.m_decoder.m_sot_length >
opj_stream_get_number_byte_left(p_stream)) { 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"); "Tile part length size inconsistent with stream length\n");
//return OPJ_FALSE;
} }
if (p_j2k->m_specific_param.m_decoder.m_sot_length > if (p_j2k->m_specific_param.m_decoder.m_sot_length >
UINT_MAX - OPJ_COMMON_CBLK_DATA_EXTRA) { UINT_MAX - OPJ_COMMON_CBLK_DATA_EXTRA) {

View File

@ -1397,13 +1397,10 @@ static OPJ_BOOL opj_t2_read_packet_data(opj_t2_t* p_t2,
(OPJ_SIZE_T)l_current_data) || (OPJ_SIZE_T)l_current_data) ||
(l_current_data + l_seg->newlen > p_src_data + p_max_length) || (l_current_data + l_seg->newlen > p_src_data + p_max_length) ||
(partial_buffer)) { (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", "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, l_seg->newlen, p_max_length, cblkno, p_pi->precno, bandno, p_pi->resno,
p_pi->compno); 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 // skip this codeblock since it is a partial read
partial_buffer = 1; partial_buffer = 1;
l_cblk->numchunks = 0; l_cblk->numchunks = 0;