mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-24 13:56:33 +02:00
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.
This commit is contained in:
parent
ffd39f9d23
commit
2f86e7bd12
@ -121,7 +121,7 @@ static int create_filter(AVFilterContext **filt_ctx, AVFilterGraph *ctx, int ind
|
|||||||
return ret;
|
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",
|
snprintf(tmp_args, sizeof(tmp_args), "%s:%s",
|
||||||
args, ctx->scale_sws_opts);
|
args, ctx->scale_sws_opts);
|
||||||
args = tmp_args;
|
args = tmp_args;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user