diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2017-05-28 03:03:46 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2017-06-05 23:16:54 +0200 |
commit | 259582feaa7ec853221ce574cd321ed0914e5989 (patch) | |
tree | fe593ac4e1233a9f3f85fdc6770feb294c6431b3 | |
parent | fde04ca718003206667716cb7a39479030efadd9 (diff) | |
download | ffmpeg-259582feaa7ec853221ce574cd321ed0914e5989.tar.gz |
avcodec/ivi_dsp: Fix runtime error: left shift of negative value -2
Fixes: 1839/clusterfuzz-testcase-minimized-6238490993885184
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 357f2316a08478a4442e8051978c7b161e10281c)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r-- | libavcodec/ivi_dsp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/ivi_dsp.c b/libavcodec/ivi_dsp.c index 7922751fdc..2286c58033 100644 --- a/libavcodec/ivi_dsp.c +++ b/libavcodec/ivi_dsp.c @@ -393,8 +393,8 @@ void ff_ivi_inverse_haar_4x4(const int32_t *in, int16_t *out, uint32_t pitch, if (flags[i]) { /* pre-scaling */ shift = !(i & 2); - sp1 = src[0] << shift; - sp2 = src[4] << shift; + sp1 = src[0] * (1 << shift); + sp2 = src[4] * (1 << shift); INV_HAAR4( sp1, sp2, src[8], src[12], dst[0], dst[4], dst[8], dst[12], t0, t1, t2, t3, t4); |