]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/xl.c
timecode: fix typo
[ffmpeg] / libavcodec / xl.c
index c29e8b319010beb3beb94d6511fed39225f976ad..78f34afa4e399f67ac8c080957ebc6d64be71934 100644 (file)
@@ -68,6 +68,12 @@ static int decode_frame(AVCodecContext *avctx,
     V = a->pic.data[2];
 
     stride = avctx->width - 4;
+
+    if (buf_size < avctx->width * avctx->height) {
+        av_log(avctx, AV_LOG_ERROR, "Packet is too small\n");
+        return AVERROR_INVALIDDATA;
+    }
+
     for (i = 0; i < avctx->height; i++) {
         /* lines are stored in reversed order */
         buf += stride;