1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-08-04 22:03:09 +02:00

avcodec/lzf: Check for input space

Fixes: use of uninitialized memory
Fixes: 423673969/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_NOTCHLC_fuzzer-5597015691296768

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:
Michael Niedermayer
2025-08-03 08:33:40 +02:00
committed by michaelni
parent 1687daa93c
commit 610d368d9b

View File

@ -56,7 +56,10 @@ int ff_lzf_uncompress(GetByteContext *gb, uint8_t **buf, int64_t *size)
p = *buf + len;
}
bytestream2_get_buffer(gb, p, s);
int s2 = bytestream2_get_buffer(gb, p, s);
if (s2 != s)
return AVERROR_INVALIDDATA;
p += s;
len += s;
} else {