diff mbox series

[FFmpeg-devel,v3,1/6] avutil/opt: check return value of av_bprint_finalize()

Message ID 1593041559-27350-1-git-send-email-lance.lmwang@gmail.com
State Accepted
Commit 200c9b1c963c47e11f2dba37c90ef637412a3d00
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>

Reviewed-by:   Nicolas George <george@nsup.org>
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
---
 libavutil/opt.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/libavutil/opt.c b/libavutil/opt.c
index 2c3f998..c8413fa 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;
 }