Browse Source

avcodec/aacdec_fixed: Fix multiple runtime error: shift exponent 127 is too large for 32-bit type 'int'

Fixes: 1851/clusterfuzz-testcase-minimized-5692607495667712

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 6c3a63fc3d)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
tags/n3.3.2
Michael Niedermayer 8 years ago
parent
commit
b330fec1ce
1 changed files with 3 additions and 1 deletions
  1. +3
    -1
      libavcodec/aacdec_fixed.c

+ 3
- 1
libavcodec/aacdec_fixed.c View File

@@ -370,7 +370,9 @@ static void apply_dependent_coupling_fixed(AACContext *ac,
shift = (gain-1024) >> 3; shift = (gain-1024) >> 3;
} }


if (shift < 0) {
if (shift < -31) {
// Nothing to do
} else if (shift < 0) {
shift = -shift; shift = -shift;
round = 1 << (shift - 1); round = 1 << (shift - 1);




Loading…
Cancel
Save