mjpegdec: check for pixel format changes
authorAnton Khirnov <anton@khirnov.net>
Sun, 14 Dec 2014 19:52:13 +0000 (20:52 +0100)
committerAnton Khirnov <anton@khirnov.net>
Sat, 20 Dec 2014 09:51:40 +0000 (10:51 +0100)
commitaa7a19b41774ce5f8a4e43f3692a4f9d90aa5c92
tree8edaa52a24f5ec931951924c23596c5f6c4662b3
parent577f1feb3fd1e51fd14af7ce6d79d468faa3b929
mjpegdec: check for pixel format changes

Fixes possible invalid memory access.

Based on code by Michael Niedermayer <michaelni@gmx.at>

CC: libav-stable@libav.org
Bug-ID: CVE-2014-8541
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
(cherry picked from commit 809c3023b699c54c90511913d3b6140dd2436550)
Signed-off-by: Anton Khirnov <anton@khirnov.net>
libavcodec/mjpegdec.c