mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2026-06-16 04:32:47 +02:00
avfilter/scale_eval: Use 64bit for factor_w/h
Avoids truncation and overflows
Fixes: #YWH-PGM40646-14
Found-by: An0n99X
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 5bbc8f828e)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
@@ -124,7 +124,7 @@ int ff_scale_adjust_dimensions(AVFilterLink *inlink,
|
||||
int force_original_aspect_ratio, int force_divisible_by)
|
||||
{
|
||||
int64_t w, h;
|
||||
int factor_w, factor_h;
|
||||
int64_t factor_w, factor_h;
|
||||
|
||||
w = *ret_w;
|
||||
h = *ret_h;
|
||||
|
||||
@@ -206,7 +206,7 @@ static int config_props(AVFilterLink *outlink)
|
||||
double var_values[VARS_NB], res;
|
||||
char *expr;
|
||||
int ret;
|
||||
int factor_w, factor_h;
|
||||
int64_t factor_w, factor_h;
|
||||
|
||||
var_values[VAR_IN_W] = var_values[VAR_IW] = inlink->w;
|
||||
var_values[VAR_IN_H] = var_values[VAR_IH] = inlink->h;
|
||||
|
||||
Reference in New Issue
Block a user