History

avfilter/vf_mestimate: Check b_count

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

Michael Niedermayer committed 5 years ago

Commit 06af6e11 parent 012804d1 file · +3 −0Browse files

Showing the changes to libavfilter (1 of 1 file). Show all

Unified · Split

libavfilter/vf_mestimate.c+3−0
@@ -100,6 +100,9 @@ static int config_input(AVFilterLink *inlink) · 99 unmodified lines
100100 s->b_height = inlink->h >> s->log2_mb_size;
101101 s->b_count = s->b_width * s->b_height;
102102
103+ if (s->b_count == 0)
104+ return AVERROR(EINVAL);
105+
103106 for (i = 0; i < 3; i++) {
104107 s->mv_table[i] = av_mallocz_array(s->b_count, sizeof(*s->mv_table[0]));
105108 if (!s->mv_table[i])

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t