[FFmpeg-cvslog] r10442 - trunk/libavcodec/nuv.c

reimar subversion
Sun Sep 9 10:52:53 CEST 2007


Author: reimar
Date: Sun Sep  9 10:52:53 2007
New Revision: 10442

Log:
10l, add check forgotten in last commit


Modified:
   trunk/libavcodec/nuv.c

Modified: trunk/libavcodec/nuv.c
==============================================================================
--- trunk/libavcodec/nuv.c	(original)
+++ trunk/libavcodec/nuv.c	Sun Sep  9 10:52:53 2007
@@ -158,6 +158,10 @@ static int decode_frame(AVCodecContext *
     if (c->codec_frameheader) {
         get_quant_quality(c, buf[10]);
         rtjpeg_decode_init(&c->rtj, &c->dsp, c->width, c->height, c->lq, c->cq);
+        if (buf_size < 12) {
+            av_log(avctx, AV_LOG_ERROR, "invalid nuv video frame\n");
+            return -1;
+        }
         buf = &buf[12];
         buf_size -= 12;
     }




More information about the ffmpeg-cvslog mailing list