A heap-based buffer overflow was discovered in the opj_t2_encode_packet function in lib/openjp2/t2.c in OpenJPEG 2.2.0. The vulnerability causes an out-of-bounds write, which may lead to remote denial of service or possibly unspecified other impact.
https://security.gentoo.org/glsa/201710-26
https://github.com/uclouvain/openjpeg/issues/992
https://github.com/uclouvain/openjpeg/commit/c535531f03369623b9b833ef41952c62257b507e