mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-18 13:35:13 +00: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. Signed-off-by: Anton Khirnov <anton@khirnov.net>
This commit is contained in:
parent
c61bfc113a
commit
f80b381bfd
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user