summaryrefslogtreecommitdiff
path: root/libavfilter
diff options
context:
space:
mode:
authorStefano Sabatini <stefano.sabatini-lala@poste.it>2011-03-30 21:30:31 +0200
committerStefano Sabatini <stefano.sabatini-lala@poste.it>2011-03-30 22:16:08 +0200
commit2f86e7bd12d8023da3349f10490b1e5b64531e23 (patch)
tree755b5530286ad1ccc5c77fe14c33b62b94191c92 /libavfilter
parentffd39f9d2366b4bbfcac3c47087a77c6eced362b (diff)
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.
Diffstat (limited to 'libavfilter')
-rw-r--r--libavfilter/graphparser.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavfilter/graphparser.c b/libavfilter/graphparser.c
index 47179e5e54..4f11529900 100644
--- a/libavfilter/graphparser.c
+++ b/libavfilter/graphparser.c
@@ -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;