提交 8c6c2747 编写于 作者: M Michael Niedermayer

avformat/vividas: Fix invalid shift in decode_key()

Fixes: left shift of 1 by 31 places cannot be represented in type 'int'
Fixes: 15118/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-5740230004441088

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpegSigned-off-by: NMichael Niedermayer <michael@niedermayer.cc>
上级 06a90cc7
......@@ -91,7 +91,7 @@ static uint32_t decode_key(uint8_t *buf)
for (int i = 0; i < 32; i++) {
unsigned p = keybits[i];
key |= !!(buf[p>>3] & (1<<(p&7))) << i;
key |= (unsigned)!!(buf[p>>3] & (1<<(p&7))) << i;
}
return key;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册