mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-12-13 18:40:03 +01: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>
(cherry picked from commit 610d368d9b)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
@@ -56,7 +56,10 @@ int ff_lzf_uncompress(GetByteContext *gb, uint8_t **buf, int64_t *size)
|
|||||||
p = *buf + len;
|
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;
|
p += s;
|
||||||
len += s;
|
len += s;
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user