]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/xan.c
vc1: signal interlaced and tff flag to the consumer
[ffmpeg] / libavcodec / xan.c
index 155dee95952093cd7ff6ccae76cae4e8b2cf6c41..b39290aedffeae5a83d28deca43895c7ca4058c4 100644 (file)
@@ -517,6 +517,10 @@ static int xan_decode_frame(AVCodecContext *avctx,
             int i;
             tag  = bytestream_get_le32(&buf);
             size = bytestream_get_be32(&buf);
+            if(size < 0) {
+                av_log(avctx, AV_LOG_ERROR, "Invalid tag size %d\n", size);
+                return AVERROR_INVALIDDATA;
+            }
             size = FFMIN(size, buf_end - buf);
             switch (tag) {
             case PALT_TAG: