avcodec/mjpegdec: Fix context fields becoming inconsistent
authorMichael Niedermayer <michaelni@gmx.at>
Tue, 25 Nov 2014 12:53:06 +0000 (13:53 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Mon, 8 Dec 2014 18:08:30 +0000 (19:08 +0100)
commit5d6f8bab02ba6d8434188172b31a4e1ac0a00756
tree7e1d7c217b7003fdb227fd92fe356878f39d10ba
parentde7671e4c47f14b2fd8c626bff27d330c693ad19
avcodec/mjpegdec: Fix context fields becoming inconsistent

Fixes out of array access
Fixes: asan_heap-oob_1ca4f85_2760_cov_144449187_miss_congeniality_pegasus_ljpg.avi
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 0eecf40935b22644e6cd74c586057237ecfd6844)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/mjpegdec.c