[FFmpeg-cvslog] avcodec/vcr1: Fix bitstream input size check

Michael Niedermayer git at videolan.org
Tue Oct 22 18:14:14 CEST 2013


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Tue Oct 22 14:40:49 2013 +0200| [77ef538818678fd8bcdf37b77923d52543b750f0] | committer: Michael Niedermayer

avcodec/vcr1: Fix bitstream input size check

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=77ef538818678fd8bcdf37b77923d52543b750f0
---

 libavcodec/vcr1.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/vcr1.c b/libavcodec/vcr1.c
index c1393b5..7cb7405 100644
--- a/libavcodec/vcr1.c
+++ b/libavcodec/vcr1.c
@@ -55,7 +55,7 @@ static int vcr1_decode_frame(AVCodecContext *avctx, void *data,
     const uint8_t *bytestream_end = bytestream + avpkt->size;
     int i, x, y, ret;
 
-    if(avpkt->size < 16 + avctx->height + avctx->width*avctx->height*5/8){
+    if(avpkt->size < 32 + avctx->height + avctx->width*avctx->height*5/8){
         av_log(avctx, AV_LOG_ERROR, "Insufficient input data.\n");
         return AVERROR(EINVAL);
     }



More information about the ffmpeg-cvslog mailing list