diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2017-05-06 22:09:59 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2017-05-11 13:02:12 +0200 |
commit | ad2296ab3a131d3560c385e43437841987166804 (patch) | |
tree | 698f609fbaa9203e3e75edc7349f076d083068c0 /libavcodec/aacdec_template.c | |
parent | 8ba1fc2a4ac21f56f90312ce3e2538d7a0b0f3b4 (diff) | |
download | ffmpeg-ad2296ab3a131d3560c385e43437841987166804.tar.gz |
avcodec/aacdec_fixed: Fix various integer overflows
Fixes: 1377/clusterfuzz-testcase-minimized-5487049807233024
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 b20855b99d..d034ae4feb 100644 --- a/libavcodec/aacdec_template.c +++ b/libavcodec/aacdec_template.c @@ -2796,9 +2796,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_clipl_int32((int64_t)che->ch[0].ret[j]<<7)+0x8000; + che->ch[0].ret[j] = (int32_t)av_clip64((int64_t)che->ch[0].ret[j]<<7, INT32_MIN, INT32_MAX-0x8000)+0x8000; if(type == TYPE_CPE) - che->ch[1].ret[j] = (int32_t)av_clipl_int32((int64_t)che->ch[1].ret[j]<<7)+0x8000; + che->ch[1].ret[j] = (int32_t)av_clip64((int64_t)che->ch[1].ret[j]<<7, INT32_MIN, INT32_MAX-0x8000)+0x8000; } } #endif /* USE_FIXED */ |