From c49e7924a8b537f2cda0da8627641fb97528fc11 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Wed, 1 Apr 2015 15:45:37 +0200 Subject: [PATCH] avutil/eval: check for av_malloc failure Signed-off-by: Michael Niedermayer --- libavutil/eval.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libavutil/eval.c b/libavutil/eval.c index ea318560de..1dfcbef7bb 100644 --- a/libavutil/eval.c +++ b/libavutil/eval.c @@ -692,6 +692,10 @@ int av_expr_parse(AVExpr **expr, const char *s, goto end; } e->var= av_mallocz(sizeof(double) *VARS); + if (!e->var) { + ret = AVERROR(ENOMEM); + goto end; + } *expr = e; e = NULL; end: