1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-26 19:01:44 +02:00

avfilter/vf_mestimate: Check b_count

Fixes: left shift of negative value -1
Fixes: Ticket8270

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
Michael Niedermayer 2021-06-05 20:04:45 +02:00
parent 012804d2e9
commit 06af6e101b

View File

@ -100,6 +100,9 @@ static int config_input(AVFilterLink *inlink)
s->b_height = inlink->h >> s->log2_mb_size;
s->b_count = s->b_width * s->b_height;
if (s->b_count == 0)
return AVERROR(EINVAL);
for (i = 0; i < 3; i++) {
s->mv_table[i] = av_mallocz_array(s->b_count, sizeof(*s->mv_table[0]));
if (!s->mv_table[i])