[FFmpeg-cvslog] ffprobe: fix crash in case -of is specified with an empty string

Stefano Sabatini git at videolan.org
Fri Nov 18 01:08:44 EET 2016


ffmpeg | branch: release/3.2 | Stefano Sabatini <stefasab at gmail.com> | Thu Nov 17 12:11:13 2016 +0100| [31c9c7ad826e6dedf8ca615c7d32f6b518ceddea] | committer: Andreas Cadhalpun

ffprobe: fix crash in case -of is specified with an empty string

Fix trac issue #5957.

(cherry picked from commit 427a47abcddab15e10ce26d971f712d90c53884b)
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun at googlemail.com>

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

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

diff --git a/ffprobe.c b/ffprobe.c
index a2980b3..79fe296 100644
--- a/ffprobe.c
+++ b/ffprobe.c
@@ -3311,6 +3311,12 @@ int main(int argc, char **argv)
         goto end;
     }
     w_name = av_strtok(print_format, "=", &buf);
+    if (!w_name) {
+        av_log(NULL, AV_LOG_ERROR,
+               "No name specified for the output format\n");
+        ret = AVERROR(EINVAL);
+        goto end;
+    }
     w_args = buf;
 
     if (show_data_hash) {



More information about the ffmpeg-cvslog mailing list