Use-after-free vulnerability was found in j2k.c in opj_j2k_write_mco function (rhbz#1263359).
Double free vulnerability in the opj_j2k_copy_default_tcp_and_create_tcd function in j2k.c in OpenJPEG allows remote attackers to execute arbitrary code or cause a denial of service (heap memory corruption) by triggering a memory-allocation failure (CVE-2015-6581).