diff mbox series

[FFmpeg-devel,v3,3/6] avformat/au: check return value of au_read_annotation()

Message ID 1593041559-27350-3-git-send-email-lance.lmwang@gmail.com
State Accepted
Headers show
Series [FFmpeg-devel,v3,1/6] avutil/opt: check return value of av_bprint_finalize()
Related show

Checks

Context Check Description
andriy/default pending
andriy/make success Make finished
andriy/make_fate success Make fate finished

Commit Message

Limin Wang June 24, 2020, 11:32 p.m. UTC
From: Limin Wang <lance.lmwang@gmail.com>

Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
---
 libavformat/au.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/libavformat/au.c b/libavformat/au.c
index ff9176a..f92863e 100644
--- a/libavformat/au.c
+++ b/libavformat/au.c
@@ -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);