[FFmpeg-cvslog] mjpegdec: allow 2 components in ljpeg_decode_yuv_scan()
Michael Niedermayer
git at videolan.org
Tue Jan 8 02:59:15 CET 2013
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Tue Jan 8 02:30:02 2013 +0100| [4c80184cf5425f11c45ff91f669a1be9cf6d32cd] | committer: Michael Niedermayer
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 at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=4c80184cf5425f11c45ff91f669a1be9cf6d32cd
---
libavcodec/mjpegdec.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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++) {
More information about the ffmpeg-cvslog
mailing list