summaryrefslogtreecommitdiff
path: root/libavfilter/graphparser.c
diff options
context:
space:
mode:
authorStefano Sabatini <stefano.sabatini-lala@poste.it>2011-03-30 21:30:31 +0200
committerAnton Khirnov <anton@khirnov.net>2011-04-25 22:45:44 +0200
commitf80b381bfd956e4470bdbc1854f88cf3ea0764a9 (patch)
treefcaa20dd62957789dc3946daa58e7b0f5fb1d449 /libavfilter/graphparser.c
parentc61bfc113ae8c562e33734acc58299e4b01fe649 (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. Signed-off-by: Anton Khirnov <anton@khirnov.net>
Diffstat (limited to 'libavfilter/graphparser.c')
-rw-r--r--libavfilter/graphparser.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavfilter/graphparser.c b/libavfilter/graphparser.c
index dddb0a2070..00fb57ad57 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;