提交 a7aa903b 编写于 作者: L Limin Wang

avformat/au: check return value of av_bprint_finalize()

Reviewed-by: NNicolas George <george@nsup.org>
Signed-off-by: NLimin Wang <lance.lmwang@gmail.com>
上级 200c9b1c
......@@ -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 {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册