Commit 560daf88 authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/flacdec: avoid undefined shift

Fixes: shift exponent 32 is too large for 32-bit type 'unsigned int'
Fixes: 4688/clusterfuzz-testcase-minimized-6572210748653568

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpegSigned-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent be4dfbf7
......@@ -460,7 +460,7 @@ static inline int decode_subframe(FLACContext *s, int channel)
return AVERROR_INVALIDDATA;
}
if (wasted) {
if (wasted && wasted < 32) {
int i;
for (i = 0; i < s->blocksize; i++)
decoded[i] = (unsigned)decoded[i] << wasted;
......
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