mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2026-10-28 10:04:37 +08:00
avfilter/vf_stack: reject a grid with more than INT_MAX cells
Regression since: aa8905a1b1
NULL pointer dereference Replicated through UnModified FFmpeg with ASAN
Found during review of the fixes for the security report GIRN0tvt58WQ
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
1 parent
cae0589065
commit
3f00282939
1 file changed
+4
-1
@@ -116,8 +116,11 @@ static av_cold int init(AVFilterContext *ctx)
|
||||
}
|
||||
}
|
||||
|
||||
if (is_grid)
|
||||
if (is_grid) {
|
||||
if (s->nb_grid_rows > INT_MAX / s->nb_grid_columns)
|
||||
return AVERROR(EINVAL);
|
||||
s->nb_inputs = s->nb_grid_rows * s->nb_grid_columns;
|
||||
}
|
||||
}
|
||||
|
||||
s->frames = av_calloc(s->nb_inputs, sizeof(*s->frames));
|
||||
|
||||
Reference in new issue
Block a user