Commit 8ebed703 authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/mpegaudiodec_template: Make l3_unscale() work with e=0

Fixes undefined behavior
Fixes: 830/clusterfuzz-testcase-6253175327686656

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpegSigned-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 108b02e5
......@@ -253,7 +253,7 @@ static inline int l3_unscale(int value, int exponent)
#endif
if (e > (SUINT)31)
return 0;
m = (m + (1 << (e - 1))) >> e;
m = (m + ((1U << e)>>1)) >> e;
return m;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment