avcodec/mjpegdec: Check index in ljpeg_decode_yuv_scan() before using it
authorMichael Niedermayer <michael@niedermayer.cc>
Wed, 4 Nov 2015 17:08:52 +0000 (18:08 +0100)
committerMichael Niedermayer <michael@niedermayer.cc>
Wed, 4 Nov 2015 18:33:33 +0000 (19:33 +0100)
commitd24888ef19ba38b787b11d1ee091a3d94920c76a
treef4895e25e7ee18dc4e12d258452596bd96210329
parentfd0bf457b734beee6715254ea264118dc4993507
avcodec/mjpegdec: Check index in ljpeg_decode_yuv_scan() before using it

Fixes: 04715144ba237443010554be0d05343f/asan_heap-oob_1eafc76_1737_c685b48041a563461839e4e7ab97abb8.jpg
Fixes out of array access

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavcodec/mjpegdec.c