diff options
author | Limin Wang <lance.lmwang@gmail.com> | 2020-06-23 07:14:51 +0800 |
---|---|---|
committer | Limin Wang <lance.lmwang@gmail.com> | 2020-07-02 21:12:37 +0800 |
commit | 64059f5063ab37828b4082c7acafe4b82c532587 (patch) | |
tree | 3dc2d9b838b950bef993bb50741dc10df3f055bb | |
parent | a7aa903b7baf075e33d5f1c3bf921b4066a9e645 (diff) |
avformat/au: check return value of au_read_annotation()
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
-rw-r--r-- | libavformat/au.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libavformat/au.c b/libavformat/au.c index ff9176a1f1..f92863e400 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); |