From 8055433b492fe971a145a07470119ef8c2c71571 Mon Sep 17 00:00:00 2001 From: Stefano Sabatini Date: Sat, 18 Jun 2011 02:02:31 +0200 Subject: graphparser: add missing NULL check in avfilter_graph_parse() Fix a crash occurring when open_inputs is NULL and *open_inputs is checked, the crash was introduced by the recent avfilter_graph_parse() syntax change. In particular, fix graph2dot crash. --- libavfilter/graphparser.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libavfilter') diff --git a/libavfilter/graphparser.c b/libavfilter/graphparser.c index d62ba8d205..5178eea4c6 100644 --- a/libavfilter/graphparser.c +++ b/libavfilter/graphparser.c @@ -387,7 +387,7 @@ int avfilter_graph_parse(AVFilterGraph *graph, const char *filters, goto fail; } - if (*open_inputs && !strcmp((*open_inputs)->name, "out") && curr_inputs) { + if (open_inputs && *open_inputs && !strcmp((*open_inputs)->name, "out") && curr_inputs) { /* Last output can be omitted if it is "[out]" */ const char *tmp = "[out]"; if ((ret = parse_outputs(&tmp, &curr_inputs, open_inputs, open_outputs, -- cgit v1.2.3