]> git.sesse.net Git - ffmpeg/commitdiff
avformat/au: check return value of au_read_annotation()
authorLimin Wang <lance.lmwang@gmail.com>
Mon, 22 Jun 2020 23:14:51 +0000 (07:14 +0800)
committerLimin Wang <lance.lmwang@gmail.com>
Thu, 2 Jul 2020 13:12:37 +0000 (21:12 +0800)
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
libavformat/au.c

index ff9176a1f15867ed82857b7e898183a5051ddb24..f92863e4009d40c28f06020ff2932fd8f6c271b6 100644 (file)
@@ -145,6 +145,7 @@ static int au_read_header(AVFormatContext *s)
     int bps, ba = 0;
     enum AVCodecID codec;
     AVStream *st;
+    int ret;
 
     tag = avio_rl32(pb);
     if (tag != MKTAG('.', 's', 'n', 'd'))
@@ -163,7 +164,9 @@ static int au_read_header(AVFormatContext *s)
 
     if (size > 24) {
         /* parse annotation field to get metadata */
-        au_read_annotation(s, size - 24);
+        ret = au_read_annotation(s, size - 24);
+        if (ret < 0)
+            return ret;
     }
 
     codec = ff_codec_get_id(codec_au_tags, id);