mirror of
https://mirror.skon.top/https://github.com/FFmpeg/FFmpeg
synced 2026-04-20 21:00:41 +08:00
avcodec/magicyuv: fix small median images
Fixes: out of array acces Fixes: 487838419/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MAGICYUV_DEC_fuzzer-4683933221715968 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:
@@ -348,7 +348,8 @@ static int magy_decode_slice(AVCodecContext *avctx, void *tdata,
|
||||
s->llviddsp.add_left_pred(dst, dst, width, 0);
|
||||
dst += stride;
|
||||
}
|
||||
lefttop = left = dst[0];
|
||||
if (1 + interlaced < height)
|
||||
lefttop = left = dst[0];
|
||||
for (k = 1 + interlaced; k < height; k++) {
|
||||
s->llviddsp.add_median_pred(dst, dst - fake_stride,
|
||||
dst, width, &left, &lefttop);
|
||||
|
||||
Reference in New Issue
Block a user