Check return value from opj_copy_image_header.

This commit is contained in:
slmistry 2015-09-14 17:44:21 +01:00
parent 8af4ce4571
commit 1c93701161
1 changed files with 10 additions and 8 deletions

View File

@ -9468,11 +9468,13 @@ OPJ_BOOL opj_j2k_decode(opj_j2k_t * p_j2k,
if (! (p_j2k->m_output_image)) { if (! (p_j2k->m_output_image)) {
return OPJ_FALSE; return OPJ_FALSE;
} }
opj_copy_image_header(p_j2k->m_manager, p_image, p_j2k->m_output_image);
if (!opj_copy_image_header(p_j2k->m_manager, p_image, p_j2k->m_output_image)) {
return OPJ_FALSE;
}
/* customization of the decoding */ /* customization of the decoding */
opj_j2k_setup_decoding(p_j2k); opj_j2k_setup_decoding(p_j2k);
/* Decode the codestream */ /* Decode the codestream */
if (!opj_j2k_exec(p_j2k, p_j2k->m_procedure_list, p_stream)) { if (!opj_j2k_exec(p_j2k, p_j2k->m_procedure_list, p_stream)) {
opj_manager_image_destroy(p_j2k->m_manager, p_j2k->m_private_image); opj_manager_image_destroy(p_j2k->m_manager, p_j2k->m_private_image);