aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libavfilter/graphparser.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/libavfilter/graphparser.c b/libavfilter/graphparser.c
index e96b20418e..a52916a146 100644
--- a/libavfilter/graphparser.c
+++ b/libavfilter/graphparser.c
@@ -186,9 +186,16 @@ static int parse_filter(AVFilterContext **filt_ctx, const char **buf, AVFilterGr
char *name = av_get_token(buf, "=,;[");
int ret;
+ if (!name)
+ return AVERROR(ENOMEM);
+
if (**buf == '=') {
(*buf)++;
opts = av_get_token(buf, "[],;");
+ if (!opts) {
+ av_free(name);
+ return AVERROR(ENOMEM);
+ }
}
ret = create_filter(filt_ctx, graph, index, name, opts, log_ctx);