This is an automated email from the git hooks/post-receive script. Git pushed a commit to branch release/4.4 in repository ffmpeg.
commit 32b97f7a95753445b04fec33f0518a26c7050b8e Author: Michael Niedermayer <[email protected]> AuthorDate: Thu Jan 15 02:47:06 2026 +0100 Commit: Michael Niedermayer <[email protected]> CommitDate: Tue May 5 18:54:56 2026 +0200 avcodec/exr: use av_realloc_array() Related to: #YWH-PGM40646-33 See: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/21347 Signed-off-by: Michael Niedermayer <[email protected]> (cherry picked from commit 09ec2b397a16de1a8016c33cdb84301b3f5e48e4) Signed-off-by: Michael Niedermayer <[email protected]> --- libavcodec/exr.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/libavcodec/exr.c b/libavcodec/exr.c index cf5af2f36a..464f09c3d8 100644 --- a/libavcodec/exr.c +++ b/libavcodec/exr.c @@ -1789,12 +1789,17 @@ static int decode_header(EXRContext *s, AVFrame *frame) } } - s->channels = av_realloc(s->channels, - ++s->nb_channels * sizeof(EXRChannel)); - if (!s->channels) { + av_assert0(s->nb_channels < INT_MAX); // Impossible due to size of the bitstream + EXRChannel *new_channels = av_realloc_array(s->channels, + s->nb_channels + 1, + sizeof(EXRChannel)); + if (!new_channels) { ret = AVERROR(ENOMEM); goto fail; } + s->nb_channels ++; + s->channels = new_channels; + channel = &s->channels[s->nb_channels - 1]; channel->pixel_type = current_pixel_type; channel->xsub = xsub; _______________________________________________ ffmpeg-cvslog mailing list -- [email protected] To unsubscribe send an email to [email protected]
