mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-01-02 21:12:12 +00:00
avcodec/prosumer: Check for bytestream eof in decompress()
Fixes: Infinite loop Fixes: 10685/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_PROSUMER_fuzzer-5652236881887232 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
8e50215b5e
commit
9acdf17b2c
@ -57,7 +57,7 @@ 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)
|
||||
if (bytestream2_get_bytes_left_p(pb) <= 0 || bytestream2_get_eof(pb))
|
||||
return 0;
|
||||
if (((b & 0xFF00u) != 0x8000u) || (b & 0xFFu)) {
|
||||
if ((b & 0xFF00u) != 0x8000u) {
|
||||
|
Loading…
Reference in New Issue
Block a user