mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-29 22:00:58 +02:00
avcodec/iff: Fix off by x error
Fixes: out of array access Fixes: 23245/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_IFF_ILBM_fuzzer-5723121327013888.fuzz 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 51225dee0a6266780d26d43bd6802bbcf736327e) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
58997137b4
commit
91f56dc647
@ -723,7 +723,7 @@ static void decode_deep_rle32(uint8_t *dst, const uint8_t *src, int src_size, in
|
||||
if (opcode >= 0) {
|
||||
int size = opcode + 1;
|
||||
for (i = 0; i < size; i++) {
|
||||
int length = FFMIN(size - i, width);
|
||||
int length = FFMIN(size - i, width - x);
|
||||
if (src_end - src < length * 4)
|
||||
return;
|
||||
memcpy(dst + y*linesize + x * 4, src, length * 4);
|
||||
|
Loading…
x
Reference in New Issue
Block a user