Browse Source

avcodec/cavs: prevent out of array read

The used value should not matter as long as its within the array
as it is multiplied by 0

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tags/n2.3
Michael Niedermayer 11 years ago
parent
commit
1fb46858c2
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      libavcodec/cavs.c

+ 1
- 1
libavcodec/cavs.c View File

@@ -525,7 +525,7 @@ void ff_cavs_inter(AVSContext *h, enum cavs_mb mb_type)
static inline void scale_mv(AVSContext *h, int *d_x, int *d_y,
cavs_vector *src, int distp)
{
int den = h->scale_den[src->ref];
int den = h->scale_den[FFMAX(src->ref, 0)];

*d_x = (src->x * distp * den + 256 + (src->x >> 31)) >> 9;
*d_y = (src->y * distp * den + 256 + (src->y >> 31)) >> 9;


Loading…
Cancel
Save