Fix null pointer dereference in opj_j2k_add_mct() (#895)

Fixes openjeg-crashes-2017-07-27/issue879-poc1.j2k of #895
This commit is contained in:
Even Rouault 2017-07-28 21:39:30 +02:00
parent c5bf5ef4d6
commit 16aeb9282f
1 changed files with 1 additions and 0 deletions

View File

@ -5584,6 +5584,7 @@ static OPJ_BOOL opj_j2k_read_mct(opj_j2k_t *p_j2k,
if (l_mct_data->m_data) {
opj_free(l_mct_data->m_data);
l_mct_data->m_data = 00;
l_mct_data->m_data_size = 0;
}
l_mct_data->m_index = l_indix;