1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-11-29 05:57:37 +02:00

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>
This commit is contained in:
Mans Rullgard
2011-07-04 12:26:59 +01:00
parent 74965f2644
commit 94350ab986
2 changed files with 3 additions and 3 deletions

View File

@@ -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;