Commit 0f36ad51 authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/prosumer: Check remaining space in put byte context

Fixes: Timeout
Fixes: 10053/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_PROSUMER_fuzzer-5636993883570176

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpegReviewed-by: 's avatarPaul B Mahol <onemda@gmail.com>
Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 3b5945b1
......@@ -57,6 +57,8 @@ static int decompress(GetByteContext *gb, int size, PutByteContext *pb, const ui
b = lut[2 * idx];
while (1) {
if (bytestream2_get_bytes_left_p(pb) <= 0)
return 0;
if (((b & 0xFF00u) != 0x8000u) || (b & 0xFFu)) {
if ((b & 0xFF00u) != 0x8000u) {
bytestream2_put_le16(pb, b);
......
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