In AdvanceCOMP 2.1, png_compress in pngex.cc in advpng has an integer overflow upon encountering an invalid PNG size, which results in an attempted memcpy to write into a buffer that is too small. (There is also a heap-based buffer over-read.)
https://usn.ubuntu.com/3936-2/
https://usn.ubuntu.com/3936-1/
https://sourceforge.net/p/advancemame/bugs/277/
https://lists.debian.org/debian-lts-announce/2021/12/msg00034.html
https://lists.debian.org/debian-lts-announce/2019/03/msg00004.html