[FFmpeg-cvslog] ffprobe: check av_asprintf() for failure

Michael Niedermayer git at videolan.org
Sat Jun 13 01:57:53 CEST 2015


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sat Jun 13 01:08:16 2015 +0200| [a75d22445ecb7adbe3fb8f705cb4fd9aa0d6b5ee] | committer: Michael Niedermayer

ffprobe: check av_asprintf() for failure

Found-by: Daemon404
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=a75d22445ecb7adbe3fb8f705cb4fd9aa0d6b5ee
---

 ffprobe.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/ffprobe.c b/ffprobe.c
index 415836b..3e5324e 100644
--- a/ffprobe.c
+++ b/ffprobe.c
@@ -2831,6 +2831,9 @@ static int opt_show_format_entry(void *optctx, const char *opt, const char *arg)
     char *buf = av_asprintf("format=%s", arg);
     int ret;
 
+    if (!buf)
+        return AVERROR(ENOMEM);
+
     av_log(NULL, AV_LOG_WARNING,
            "Option '%s' is deprecated, use '-show_entries format=%s' instead\n",
            opt, arg);



More information about the ffmpeg-cvslog mailing list