avcodec/mjpegdec: check bits per pixel for changes similar to dimensions
authorMichael Niedermayer <michaelni@gmx.at>
Thu, 2 Oct 2014 23:50:27 +0000 (01:50 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Fri, 3 Oct 2014 00:30:00 +0000 (02:30 +0200)
commit0ffa44340f247e5d24d006726ecc9c66c55dcf22
tree7223820a0082596a5786dd221da33d549bad2721
parent0bd9b78fb6c4831cfffe368989583b337bdacca6
avcodec/mjpegdec: check bits per pixel for changes similar to dimensions

Fixes out of array accesses
Fixes: asan_heap-oob_16668e9_2_asan_heap-oob_16668e9_346_miss_congeniality_pegasus_mjpg.avi

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 5c378d6a6df8243f06c87962b873bd563e58cd39)

Conflicts:

libavcodec/mjpegdec.c
(cherry picked from commit 94371a404c663c3dae3d542fa43951567ab67f82)

Conflicts:

libavcodec/mjpegdec.c
libavcodec/mjpegdec.c