avcodec/exr: Check ymin vs. h
Fixes: out of array access
Fixes: 26532/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_EXR_fuzzer-5613925708857344
Fixes: 27443/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_EXR_fuzzer-5631239813595136
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 3e5959b345
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
@@ -1811,7 +1811,7 @@ static int decode_frame(AVCodecContext *avctx, void *data,
|
|||||||
ptr = picture->data[0];
|
ptr = picture->data[0];
|
||||||
|
|
||||||
// Zero out the start if ymin is not 0
|
// Zero out the start if ymin is not 0
|
||||||
for (y = 0; y < s->ymin; y++) {
|
for (y = 0; y < FFMIN(s->ymin, s->h); y++) {
|
||||||
memset(ptr, 0, out_line_size);
|
memset(ptr, 0, out_line_size);
|
||||||
ptr += picture->linesize[0];
|
ptr += picture->linesize[0];
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user