Commit 58dd25f8 authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/mpegaudiodec_template: Check for negative e

Fixes: undefined shift
Fixes: 631/clusterfuzz-testcase-6725491035734016

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpegSigned-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 5cd3cd5b
......@@ -251,7 +251,7 @@ static inline int l3_unscale(int value, int exponent)
if(e < 1)
av_log(NULL, AV_LOG_WARNING, "l3_unscale: e is %d\n", e);
#endif
if (e > 31)
if (e > (SUINT)31)
return 0;
m = (m + (1 << (e - 1))) >> e;
......
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