diff options
author | Limin Wang <lance.lmwang@gmail.com> | 2020-06-22 21:39:30 +0800 |
---|---|---|
committer | Limin Wang <lance.lmwang@gmail.com> | 2020-07-02 21:12:37 +0800 |
commit | 200c9b1c963c47e11f2dba37c90ef637412a3d00 (patch) | |
tree | 3dcf61f1fe5c741869dd926bed7e41c143dc9708 /libavutil/opt.c | |
parent | af5751940e022a5216880fb89f69ef641aa1dee9 (diff) | |
download | ffmpeg-200c9b1c963c47e11f2dba37c90ef637412a3d00.tar.gz |
avutil/opt: check return value of av_bprint_finalize()
Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
Diffstat (limited to 'libavutil/opt.c')
-rw-r--r-- | libavutil/opt.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libavutil/opt.c b/libavutil/opt.c index 2c3f998d97..c8413fa5e1 100644 --- a/libavutil/opt.c +++ b/libavutil/opt.c @@ -2120,6 +2120,8 @@ int av_opt_serialize(void *obj, int opt_flags, int flags, char **buffer, av_freep(&buf); } } - av_bprint_finalize(&bprint, buffer); + ret = av_bprint_finalize(&bprint, buffer); + if (ret < 0) + return ret; return 0; } |