提交 f80b381b 编写于 作者: S Stefano Sabatini 提交者: Anton Khirnov

graphparser: add a NULL check on the argument passed to strstr

Fix crash in create_filter() which occurrs if a scale filter with no
args is provided.
Signed-off-by: NAnton Khirnov <anton@khirnov.net>
上级 c61bfc11
......@@ -121,7 +121,7 @@ static int create_filter(AVFilterContext **filt_ctx, AVFilterGraph *ctx, int ind
return ret;
}
if (!strcmp(filt_name, "scale") && !strstr(args, "flags")) {
if (!strcmp(filt_name, "scale") && args && !strstr(args, "flags")) {
snprintf(tmp_args, sizeof(tmp_args), "%s:%s",
args, ctx->scale_sws_opts);
args = tmp_args;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册