The decode_ihdr_chunk function in libavcodec/pngdec.c in FFMpeg before 2.1.6, 2.2.x through 2.3.x, and 2.4.x before 2.4.4 allows remote attackers to cause a denial of service (out-of-bounds heap access) and possibly have other unspecified impact via an IDAT before an IHDR in a PNG file.
https://www.ffmpeg.org/security.html
https://security.gentoo.org/glsa/201603-06
https://lists.debian.org/debian-lts-announce/2018/12/msg00009.html
http://git.videolan.org/?p=ffmpeg.git%3Ba=commit%3Bh=79ceaf827be0b070675d4cd0a55c3386542defd8