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

Fix trac issue #5957.
This commit is contained in:
Stefano Sabatini 2016-11-17 12:11:13 +01:00
parent 709c87109d
commit 427a47abcd
1 changed files with 6 additions and 0 deletions

View File

@ -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) {