diff options
author | Stefano Sabatini <stefano.sabatini-lala@poste.it> | 2010-11-07 18:40:09 +0000 |
---|---|---|
committer | Stefano Sabatini <stefano.sabatini-lala@poste.it> | 2010-11-07 18:40:09 +0000 |
commit | 00b3ca3c7a779e3b062d6ef0c5067c60c8f8a357 (patch) | |
tree | b57980de88d45946bf16166b61a31b3fd2f89fd2 /libavfilter/graphparser.c | |
parent | 42e7f6d781e0533505ffab53640739c7912a6753 (diff) | |
download | ffmpeg-00b3ca3c7a779e3b062d6ef0c5067c60c8f8a357.tar.gz |
Add missing memory check in parse_inputs(), and fix possible (yet very unlikely) crash.
Originally committed as revision 25697 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavfilter/graphparser.c')
-rw-r--r-- | libavfilter/graphparser.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libavfilter/graphparser.c b/libavfilter/graphparser.c index 6c73543770..3b49898ba2 100644 --- a/libavfilter/graphparser.c +++ b/libavfilter/graphparser.c @@ -258,7 +258,8 @@ static int parse_inputs(const char **buf, AVFilterInOut **curr_inputs, av_free(name); } else { /* Not in the list, so add it as an input */ - match = av_mallocz(sizeof(AVFilterInOut)); + if (!(match = av_mallocz(sizeof(AVFilterInOut)))) + return AVERROR(ENOMEM); match->name = name; match->pad_idx = pad; } |