[SCM] libav/experimental: a64: check that extradata exists before reading from it

siretart at users.alioth.debian.org siretart at users.alioth.debian.org
Sun Aug 10 16:03:10 UTC 2014


The following commit has been merged in the experimental branch:
commit 3ef6c5264b2590781b4ed556443ff49709dd45fb
Author: Anton Khirnov <anton at khirnov.net>
Date:   Sat May 3 10:44:17 2014 +0200

    a64: check that extradata exists before reading from it

diff --git a/libavformat/a64.c b/libavformat/a64.c
index 640e786..da8e310 100644
--- a/libavformat/a64.c
+++ b/libavformat/a64.c
@@ -35,6 +35,12 @@ static int a64_write_header(AVFormatContext *s)
         0x00, //charset_lifetime (multi only)
         0x00  //fps in 50/fps;
     };
+
+    if (avctx->extradata_size < 4) {
+        av_log(s, AV_LOG_ERROR, "Missing extradata\n");
+        return AVERROR(EINVAL);
+    }
+
     switch (avctx->codec->id) {
     case AV_CODEC_ID_A64_MULTI:
         header[2] = 0x00;

-- 
Libav/FFmpeg packaging



More information about the pkg-multimedia-commits mailing list