diff options
author | Mans Rullgard <mans@mansr.com> | 2011-07-04 12:26:59 +0100 |
---|---|---|
committer | Mans Rullgard <mans@mansr.com> | 2011-07-04 12:31:47 +0100 |
commit | 94350ab986dfce1c93fa720baf28b548c60a9879 (patch) | |
tree | 80da25e117be1e6cd2b6b1367048e5c9cea53a39 /libavutil | |
parent | 74965f2644e3af4d21a1d52841b5b48b2bc0895b (diff) | |
download | ffmpeg-94350ab986dfce1c93fa720baf28b548c60a9879.tar.gz |
eval: clear Parser instances before using
This prevents random values from the stack being used as
"variables" in expressions.
Signed-off-by: Mans Rullgard <mans@mansr.com>
Diffstat (limited to 'libavutil')
-rw-r--r-- | libavutil/eval.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavutil/eval.c b/libavutil/eval.c index 8ce687df19..4d55f42664 100644 --- a/libavutil/eval.c +++ b/libavutil/eval.c @@ -461,7 +461,7 @@ int av_expr_parse(AVExpr **expr, const char *s, const char * const *func2_names, double (* const *funcs2)(void *, double, double), int log_offset, void *log_ctx) { - Parser p; + Parser p = { 0 }; AVExpr *e = NULL; char *w = av_malloc(strlen(s) + 1); char *wp = w; @@ -506,7 +506,7 @@ end: double av_expr_eval(AVExpr *e, const double *const_values, void *opaque) { - Parser p; + Parser p = { 0 }; p.const_values = const_values; p.opaque = opaque; |