Avoid assertion when running opj_j2k_merge_ppt() several time due to e6674f7ed66abdb32a0be5944f618722b6a7b5d5 revert. Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2785
This commit is contained in:
parent
832dfd1866
commit
0c913b0aba
|
@ -4094,7 +4094,12 @@ static OPJ_BOOL opj_j2k_merge_ppt(opj_tcp_t *p_tcp, opj_event_mgr_t * p_manager)
|
||||||
/* preconditions */
|
/* preconditions */
|
||||||
assert(p_tcp != 00);
|
assert(p_tcp != 00);
|
||||||
assert(p_manager != 00);
|
assert(p_manager != 00);
|
||||||
assert(p_tcp->ppt_buffer == NULL);
|
|
||||||
|
if (p_tcp->ppt_buffer != NULL) {
|
||||||
|
opj_event_msg(p_manager, EVT_ERROR,
|
||||||
|
"opj_j2k_merge_ppt() has already been called\n");
|
||||||
|
return OPJ_FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
if (p_tcp->ppt == 0U) {
|
if (p_tcp->ppt == 0U) {
|
||||||
return OPJ_TRUE;
|
return OPJ_TRUE;
|
||||||
|
|
Loading…
Reference in New Issue