diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-01-08 02:30:02 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-01-08 02:54:21 +0100 |
commit | 4c80184cf5425f11c45ff91f669a1be9cf6d32cd (patch) | |
tree | cb1d07065c577bfc3185d7056b2f87ef762ea187 /libavcodec/mjpegdec.c | |
parent | b23aff6755ff96b3b338e4b5f9eb3b6a91fda433 (diff) | |
download | ffmpeg-streaming-4c80184cf5425f11c45ff91f669a1be9cf6d32cd.zip ffmpeg-streaming-4c80184cf5425f11c45ff91f669a1be9cf6d32cd.tar.gz |
mjpegdec: allow 2 components in ljpeg_decode_yuv_scan()
Fixes assertion failure
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/mjpegdec.c')
-rw-r--r-- | libavcodec/mjpegdec.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c index feb2f89..78af858 100644 --- a/libavcodec/mjpegdec.c +++ b/libavcodec/mjpegdec.c @@ -852,7 +852,7 @@ static int ljpeg_decode_yuv_scan(MJpegDecodeContext *s, int predictor, point_transform += bits - s->bits; - av_assert0(nb_components==1 || nb_components==3); + av_assert0(nb_components>=1 && nb_components<=3); for (mb_y = 0; mb_y < s->mb_height; mb_y++) { for (mb_x = 0; mb_x < s->mb_width; mb_x++) { |