From 055317a74c179d5e849d9723eb08b0c005e0c0cc Mon Sep 17 00:00:00 2001 From: Arpi Date: Sun, 27 Oct 2002 19:20:02 +0000 Subject: [PATCH] 3rd 10l - don't let it read data beyond the end of frame Originally committed as revision 1083 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavcodec/mjpeg.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/mjpeg.c b/libavcodec/mjpeg.c index 7ca1601086..2360d7ff80 100644 --- a/libavcodec/mjpeg.c +++ b/libavcodec/mjpeg.c @@ -1283,7 +1283,7 @@ static int mjpeg_decode_frame(AVCodecContext *avctx, while (srcgb, s->buffer, s->buffer_size); + init_get_bits(&s->gb, s->buffer, dst - s->buffer); } else init_get_bits(&s->gb, buf_ptr, buf_end - buf_ptr);