History

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.

Stefano Sabatini committed 15 years ago

Commit f80b3811 parent c61bfc11 file · +1 −1Browse files

Showing the changes to libavfilter/graphparser.c (1 of 1 file). Show all

Unified · Split

libavfilter/graphparser.c+1−1
@@ -121,7 +121,7 @@ static int create_filter(AVFilterContext **filt_ctx, AVFilterGraph *ctx, int ind · 120 unmodified lines
121121 return ret;
122122 }
123123
124− if (!strcmp(filt_name, "scale") && !strstr(args, "flags")) {
124+ if (!strcmp(filt_name, "scale") && args && !strstr(args, "flags")) {
125125 snprintf(tmp_args, sizeof(tmp_args), "%s:%s",
126126 args, ctx->scale_sws_opts);
127127 args = tmp_args;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t