libavcodec/mjpegdec.c in FFmpeg before 2.4.2 considers only dimension differences, and not bits-per-pixel differences, when determining whether an image size has changed, which allows remote attackers to cause a denial of service (out-of-bounds access) or possibly have unspecified other impact via crafted MJPEG data.
https://security.gentoo.org/glsa/201603-06
http://www.ubuntu.com/usn/USN-2944-1
http://www.ffmpeg.org/security.html
http://git.videolan.org/?p=ffmpeg.git%3Ba=commit%3Bh=5c378d6a6df8243f06c87962b873bd563e58cd39