diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2017-05-19 12:14:59 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2017-05-19 13:14:12 +0200 |
commit | 2ccd2c9003c77aee8ffb5f4f43863e35bdf0e4b6 (patch) | |
tree | a07f9e70ee70d6b502a593d06b5d0388bd3ca38b /libavcodec/aacdec_template.c | |
parent | 55b56a8d6a061db7dff730341f062086f65d4bd4 (diff) | |
download | ffmpeg-streaming-2ccd2c9003c77aee8ffb5f4f43863e35bdf0e4b6.zip ffmpeg-streaming-2ccd2c9003c77aee8ffb5f4f43863e35bdf0e4b6.tar.gz |
avcodec/aacsbr_fixed: Fix multiple runtime error: left shift of negative value -407
Fixes: 1674/clusterfuzz-testcase-minimized-6092531563495424
Fixes: 1686/clusterfuzz-testcase-minimized-6282691643179008
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/aacdec_template.c')
-rw-r--r-- | libavcodec/aacdec_template.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/aacdec_template.c b/libavcodec/aacdec_template.c index a3780c6..4b98142 100644 --- a/libavcodec/aacdec_template.c +++ b/libavcodec/aacdec_template.c @@ -2800,9 +2800,9 @@ static void spectral_to_sample(AACContext *ac, int samples) int j; /* preparation for resampler */ for(j = 0; j<samples; j++){ - che->ch[0].ret[j] = (int32_t)av_clip64((int64_t)che->ch[0].ret[j]<<7, INT32_MIN, INT32_MAX-0x8000)+0x8000; + che->ch[0].ret[j] = (int32_t)av_clip64((int64_t)che->ch[0].ret[j]*128, INT32_MIN, INT32_MAX-0x8000)+0x8000; if(type == TYPE_CPE) - che->ch[1].ret[j] = (int32_t)av_clip64((int64_t)che->ch[1].ret[j]<<7, INT32_MIN, INT32_MAX-0x8000)+0x8000; + che->ch[1].ret[j] = (int32_t)av_clip64((int64_t)che->ch[1].ret[j]*128, INT32_MIN, INT32_MAX-0x8000)+0x8000; } } #endif /* USE_FIXED */ |