aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/cavs.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2017-06-05 19:33:56 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2017-06-05 22:43:23 +0200
commit1e6ee86d9254e8fd2158cc9a31d3be96b0809411 (patch)
tree09ecb482911acd873b80d09267926e45bb6b2e07 /libavcodec/cavs.c
parent2ef9fc997dba90c9af4702971300b60bf0c41ac6 (diff)
downloadffmpeg-1e6ee86d9254e8fd2158cc9a31d3be96b0809411.tar.gz
avcodec/cavs: Fix runtime error: signed integer overflow: -12648062 * 256 cannot be represented in type 'int'
Fixes: 2067/clusterfuzz-testcase-minimized-5578430902960128 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/cavs.c')
-rw-r--r--libavcodec/cavs.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/libavcodec/cavs.c b/libavcodec/cavs.c
index 40bb63a278..ba2b6ef232 100644
--- a/libavcodec/cavs.c
+++ b/libavcodec/cavs.c
@@ -537,8 +537,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[FFMAX(src->ref, 0)];
-
+ int64_t den = h->scale_den[FFMAX(src->ref, 0)];
*d_x = (src->x * distp * den + 256 + FF_SIGNBIT(src->x)) >> 9;
*d_y = (src->y * distp * den + 256 + FF_SIGNBIT(src->y)) >> 9;
}