[FFmpeg-cvslog] avutil/eval: check for av_malloc failure

Michael Niedermayer git at videolan.org
Wed Apr 1 16:18:12 CEST 2015


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Wed Apr  1 15:45:37 2015 +0200| [c49e7924a8b537f2cda0da8627641fb97528fc11] | committer: Michael Niedermayer

avutil/eval: check for av_malloc failure

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c49e7924a8b537f2cda0da8627641fb97528fc11
---

 libavutil/eval.c |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/libavutil/eval.c b/libavutil/eval.c
index ea31856..1dfcbef 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:



More information about the ffmpeg-cvslog mailing list