mirror of https://git.ffmpeg.org/ffmpeg.git
avcodec/notchlc: Check bytes left before reading
Fixes: Use of uninitialized value Fixes: 71230/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_NOTCHLC_fuzzer-4624502095413248 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
01910ca603
commit
b9c7f50c7d
|
@ -93,6 +93,9 @@ static int lz4_decompress(AVCodecContext *avctx,
|
|||
} while (current == 255);
|
||||
}
|
||||
|
||||
if (bytestream2_get_bytes_left(gb) < num_literals)
|
||||
return AVERROR_INVALIDDATA;
|
||||
|
||||
if (pos + num_literals < HISTORY_SIZE) {
|
||||
bytestream2_get_buffer(gb, history + pos, num_literals);
|
||||
pos += num_literals;
|
||||
|
|
Loading…
Reference in New Issue