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:53:28 +0000 (10:53 +0100)
commitda4f5d9d77882bee568266d764b95b51f81b7871
treec77eb1ed734a2d478d2068320f8d5be35b76ae94
parent931f5b235112f1c2a09dead36f0a228061d23942
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>
(cherry picked from commit aa7a19b41774ce5f8a4e43f3692a4f9d90aa5c92)
Signed-off-by: Anton Khirnov <anton@khirnov.net>
libavcodec/mjpegdec.c