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:18:13 +0000 (02:18 +0200)
commit5c378d6a6df8243f06c87962b873bd563e58cd39
tree83e50097033ed1138e85612da7d336dcf3fff67c
parent06e7d58410a17dc72c30ee7f3145fcacc425f4f2
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>
libavcodec/mjpegdec.c