Commit 0953736b authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/nellymoser: Fix multiple left shift of negative value -8591

Fixes: 1342/clusterfuzz-testcase-minimized-5490842129137664

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpegSigned-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 1002932a
......@@ -84,7 +84,7 @@ const int16_t ff_nelly_delta_table[32] = {
static inline int signed_shift(int i, int shift) {
if (shift > 0)
return i << shift;
return (unsigned)i << shift;
return i >> -shift;
}
......@@ -108,7 +108,7 @@ static int headroom(int *la)
return 31;
}
l = 30 - av_log2(FFABS(*la));
*la <<= l;
*la *= 1<<l;
return l;
}
......
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