Use-after-free vulnerability was found in j2k.c in opjj2kwrite_mco function (rhbz#1263359).
Double free vulnerability in the opjj2kcopydefaulttcpandcreate_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).