Skip to content

Commit 3e5959b

Browse files
committed
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>
1 parent 1278f11 commit 3e5959b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: libavcodec/exr.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1830,7 +1830,7 @@ static int decode_frame(AVCodecContext *avctx, void *data,
18301830
// Zero out the start if ymin is not 0
18311831
for (i = 0; i < planes; i++) {
18321832
ptr = picture->data[i];
1833-
for (y = 0; y < s->ymin; y++) {
1833+
for (y = 0; y < FFMIN(s->ymin, s->h); y++) {
18341834
memset(ptr, 0, out_line_size);
18351835
ptr += picture->linesize[i];
18361836
}

0 commit comments

Comments
 (0)