Browse Source

avcodec/aacdec_fixed: Fix undefined shift

Fixes: runtime error: left shift of negative value -801112064
Fixes: 3492/clusterfuzz-testcase-minimized-5784775283441664

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
tags/n4.0
Michael Niedermayer 8 years ago
parent
commit
fca198fb5b
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      libavcodec/aacdec_fixed.c

+ 1
- 1
libavcodec/aacdec_fixed.c View File

@@ -309,7 +309,7 @@ static av_always_inline void predict(PredictorState *ps, int *coef,
if (shift > 0) {
*coef += (unsigned)((pv.mant + (1 << (shift - 1))) >> shift);
} else
*coef += (unsigned)(pv.mant << -shift);
*coef += (unsigned)pv.mant << -shift;
}
}



Loading…
Cancel
Save