[FFmpeg-cvslog] lavfi/aevalsrc: initialize pointer to expression to NULL

Stefano Sabatini git at videolan.org
Thu Nov 21 23:22:41 CET 2013


ffmpeg | branch: master | Stefano Sabatini <stefasab at gmail.com> | Thu Nov 21 23:13:16 2013 +0100| [98786aa2f05da5e785d9344a04767dfbf99c10f0] | committer: Stefano Sabatini

lavfi/aevalsrc: initialize pointer to expression to NULL

Fix crash in case of expression parsing failure.

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

 libavfilter/asrc_aevalsrc.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/libavfilter/asrc_aevalsrc.c b/libavfilter/asrc_aevalsrc.c
index 4c1bbdf..41ad632 100644
--- a/libavfilter/asrc_aevalsrc.c
+++ b/libavfilter/asrc_aevalsrc.c
@@ -101,6 +101,7 @@ static av_cold int init(AVFilterContext *ctx)
             ret = AVERROR(ENOMEM);
             goto end;
         }
+        eval->expr[eval->nb_channels-1] = NULL;
         ret = av_expr_parse(&eval->expr[eval->nb_channels - 1], expr, var_names,
                             NULL, NULL, NULL, NULL, 0, ctx);
         if (ret < 0)



More information about the ffmpeg-cvslog mailing list