diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2017-05-16 23:44:24 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2017-06-02 01:14:38 +0200 |
commit | b7b28b6aadd43f0feea81f09272e6b4e0f2a0ca1 (patch) | |
tree | 3954e42afecefcbb32b9977dd9e8c73037d7c8e5 /libavcodec/hq_hqa.c | |
parent | 21d50c185db03349282bc718f8aa4b7bb3d355a2 (diff) | |
download | ffmpeg-b7b28b6aadd43f0feea81f09272e6b4e0f2a0ca1.tar.gz |
avcodec/hq_hqa: Fix: runtime error: signed integer overflow: -255 * 10180917 cannot be represented in type 'int'
Fixes: 1626/clusterfuzz-testcase-minimized-6416580571299840
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 3d9cb583c8f005a260d255853ef5f1c21e8599a0)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/hq_hqa.c')
-rw-r--r-- | libavcodec/hq_hqa.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/hq_hqa.c b/libavcodec/hq_hqa.c index 80dc6b5d40..f88ad7d5f5 100644 --- a/libavcodec/hq_hqa.c +++ b/libavcodec/hq_hqa.c @@ -83,7 +83,7 @@ static int hq_decode_block(HQContext *c, GetBitContext *gb, int16_t block[64], pos += ff_hq_ac_skips[val]; if (pos >= 64) break; - block[ff_zigzag_direct[pos]] = (ff_hq_ac_syms[val] * q[pos]) >> 12; + block[ff_zigzag_direct[pos]] = (int)(ff_hq_ac_syms[val] * (unsigned)q[pos]) >> 12; pos++; } |