]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/msrle.c
avcodec/ac3enc: Use specific error code in validate_float_option()
[ffmpeg] / libavcodec / msrle.c
index adb55b1302c0762de53852731946068ff15ea7f9..1ab8a419851f82ffc8c3f4ae765ff77839590cf9 100644 (file)
@@ -95,6 +95,9 @@ static int msrle_decode_frame(AVCodecContext *avctx,
     s->buf = buf;
     s->size = buf_size;
 
+    if (buf_size < 2) //Minimally a end of picture code should be there
+        return AVERROR_INVALIDDATA;
+
     if ((ret = ff_reget_buffer(avctx, s->frame)) < 0)
         return ret;