From: Stefano Sabatini Date: Sat, 18 Jun 2011 00:02:31 +0000 (+0200) Subject: graphparser: add missing NULL check in avfilter_graph_parse() X-Git-Tag: n0.8~55 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=8055433b492fe971a145a07470119ef8c2c71571;p=coroid%2Fffmpeg_saccubus.git 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. --- diff --git a/libavfilter/graphparser.c b/libavfilter/graphparser.c index d62ba8d20..5178eea4c 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,