提交 bd0f8152 编写于 作者: M Michael Niedermayer

avcodec/pixlet: Fix log(0) check

Fixes: passing zero to clz(), which is not a valid argument
Fixes: 23337/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_PIXLET_fuzzer-5179131989065728

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpegSigned-off-by: NMichael Niedermayer <michael@niedermayer.cc>
上级 9b5fc789
......@@ -221,7 +221,7 @@ static int read_high_coeffs(AVCodecContext *avctx, uint8_t *src, int16_t *dst,
length = 25 - nbits;
while (i < size) {
if (state >> 8 != -3)
if (((state >> 8) + 3) & 0xFFFFFFF)
value = ff_clz((state >> 8) + 3) ^ 0x1F;
else
value = -1;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册