Fixes: left shift of negative value -1 Fixes: Ticket8270
Showing the changes to libavfilter (1 of 1 file). Show all
Unified · Split
| @@ -100,6 +100,9 @@ static int config_input(AVFilterLink *inlink) · 99 unmodified lines | |||
| 100 | s->b_height = inlink->h >> s->log2_mb_size; | 100 | s->b_height = inlink->h >> s->log2_mb_size; |
| 101 | s->b_count = s->b_width * s->b_height; | 101 | s->b_count = s->b_width * s->b_height; |
| 102 | 102 | ||
| 103 | if (s->b_count == 0) | ||
| 104 | return AVERROR(EINVAL); | ||
| 105 | |||
| 103 | for (i = 0; i < 3; i++) { | 106 | for (i = 0; i < 3; i++) { |
| 104 | s->mv_table[i] = av_mallocz_array(s->b_count, sizeof(*s->mv_table[0])); | 107 | s->mv_table[i] = av_mallocz_array(s->b_count, sizeof(*s->mv_table[0])); |
| 105 | if (!s->mv_table[i]) | 108 | if (!s->mv_table[i]) |