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 2f86e7b1 parent ffd39f91 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
121 return ret;121 return ret;
122 }122 }
123 123
124 if (!strcmp(filt_name, "scale") && !strstr(args, "flags")) {124 if (!strcmp(filt_name, "scale") && args && !strstr(args, "flags")) {
125 snprintf(tmp_args, sizeof(tmp_args), "%s:%s",125 snprintf(tmp_args, sizeof(tmp_args), "%s:%s",
126 args, ctx->scale_sws_opts);126 args, ctx->scale_sws_opts);
127 args = tmp_args;127 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