From 427a47abcddab15e10ce26d971f712d90c53884b Mon Sep 17 00:00:00 2001 From: Stefano Sabatini Date: Thu, 17 Nov 2016 12:11:13 +0100 Subject: ffprobe: fix crash in case -of is specified with an empty string Fix trac issue #5957. --- ffprobe.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'ffprobe.c') diff --git a/ffprobe.c b/ffprobe.c index a2980b338c..79fe296489 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) { -- cgit v1.2.3