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 19:49:12 +0000 (20:49 +0100)
commitfabbfaa095660982cc0bc63242c459561fa37037
treeb138e8cadcd0361b235fe019ea1e37bffd076056
parentafa92907f3c6a0c3bdad766ec8d938ee17ee1c9e
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>
libavcodec/mjpegdec.c