diff options
author | Limin Wang <lance.lmwang@gmail.com> | 2020-06-22 21:49:30 +0800 |
---|---|---|
committer | Limin Wang <lance.lmwang@gmail.com> | 2020-07-02 21:12:37 +0800 |
commit | a7aa903b7baf075e33d5f1c3bf921b4066a9e645 (patch) | |
tree | ea405be790a359add9a787bdd0b69792c20ec434 | |
parent | 200c9b1c963c47e11f2dba37c90ef637412a3d00 (diff) | |
download | ffmpeg-a7aa903b7baf075e33d5f1c3bf921b4066a9e645.tar.gz |
avformat/au: check return value of av_bprint_finalize()
Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
-rw-r--r-- | libavformat/au.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libavformat/au.c b/libavformat/au.c index 4afee85a94..ff9176a1f1 100644 --- a/libavformat/au.c +++ b/libavformat/au.c @@ -81,7 +81,7 @@ static int au_read_annotation(AVFormatContext *s, int size) AVBPrint bprint; char * key = NULL; char * value = NULL; - int i; + int ret, i; av_bprint_init(&bprint, 64, AV_BPRINT_SIZE_UNLIMITED); @@ -92,7 +92,9 @@ static int au_read_annotation(AVFormatContext *s, int size) if (c == '\0') { state = PARSE_FINISHED; } else if (c == '=') { - av_bprint_finalize(&bprint, &key); + ret = av_bprint_finalize(&bprint, &key); + if (ret < 0) + return ret; av_bprint_init(&bprint, 64, AV_BPRINT_SIZE_UNLIMITED); state = PARSE_VALUE; } else { |