avcodec/mjpegdec: Check number of components for JPEG-LS
authorMichael Niedermayer <michaelni@gmx.at>
Wed, 4 Feb 2015 19:48:30 +0000 (20:48 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Wed, 4 Feb 2015 20:27:25 +0000 (21:27 +0100)
commita6ba4c1116c16c01a2faf188d47c9ed7bb727a06
tree22cd3c0072d546d8232d783c6753abab6e3d49eb
parentaf0544ca3d40d1277dec1175a1939a74c5b12ce4
avcodec/mjpegdec: Check number of components for JPEG-LS

Fixes out of array accesses
Fixes: asan_heap-oob_1c1a4ea_1242_cov_2274415971_TESTcmyk.jpg

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

Conflicts:

libavcodec/mjpegdec.c
libavcodec/mjpegdec.c