avcodec/exr: Handle axmax like bxmin in 04d7a6d3db

Fixes: out of array access
Fixes: 418335931/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_EXR_DEC_fuzzer-6718455383654400
Fixes: 471611870/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_EXR_DEC_fuzzer-6645447302381568

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 33b3dbaf15)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
Michael Niedermayer 2025-11-09 16:39:45 +01:00
parent 9f327326e5
commit cac7efdfaa
No known key found for this signature in database
GPG key ID: B18E8928B3948D64

View file

@ -1485,7 +1485,8 @@ static int decode_block(AVCodecContext *avctx, void *tdata,
}
// Zero out the end if xmax+1 is not w
memset(ptr_x, 0, axmax);
if (s->desc->flags & AV_PIX_FMT_FLAG_PLANAR || !c)
memset(ptr_x, 0, axmax);
channel_buffer[c] += td->channel_line_size;
}
}