From 668673f10ce225d26a96f1aeb62066e8c641c85a Mon Sep 17 00:00:00 2001 From: Stefano Sabatini Date: Thu, 11 Nov 2010 22:41:22 +0000 Subject: [PATCH] Add missing check on the existence of an associated output pad for each specified output link label. Fix crash. Originally committed as revision 25723 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavfilter/graphparser.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/libavfilter/graphparser.c b/libavfilter/graphparser.c index 4266e8134d..99982b3727 100644 --- a/libavfilter/graphparser.c +++ b/libavfilter/graphparser.c @@ -294,6 +294,12 @@ static int parse_outputs(const char **buf, AVFilterInOut **curr_inputs, AVFilterInOut *match; AVFilterInOut *input = *curr_inputs; + if (!input) { + av_log(log_ctx, AV_LOG_ERROR, + "No output pad can be associated to link label '%s'.\n", + name); + return AVERROR(EINVAL); + } *curr_inputs = (*curr_inputs)->next; if (!name)