This is an automated email from the git hooks/post-receive script. Git pushed a commit to branch release/8.1 in repository ffmpeg.
commit de16831d5e2b3369d24e264595565f74ca64d7f6 Author: Michael Niedermayer <[email protected]> AuthorDate: Mon Sep 14 02:27:37 2026 +0200 Commit: Michael Niedermayer <[email protected]> CommitDate: Sat Sep 19 14:27:16 2026 +0200 avcodec/cook: require the channel mask to cover every subpacket channel Fixes: 2MzQLLrSXH8j Fixes: out of array write Found-by: Zheng Yu @ Depthfirst (cherry picked from commit 3e09f5e24eb277a6d011745ff03e602f61c5c171) Signed-off-by: Michael Niedermayer <[email protected]> --- libavcodec/cook.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/libavcodec/cook.c b/libavcodec/cook.c index 8256afc2e4..5ed3d2596b 100644 --- a/libavcodec/cook.c +++ b/libavcodec/cook.c @@ -1249,6 +1249,12 @@ static av_cold int cook_decode_init(AVCodecContext *avctx) s++; } + if (channel_mask && av_popcount(channel_mask) != total_channels) { + av_log(avctx, AV_LOG_ERROR, "Channel mask 0x%x does not match %d subpacket channels\n", + channel_mask, total_channels); + return AVERROR_INVALIDDATA; + } + /* Try to catch some obviously faulty streams, otherwise it might be exploitable */ if (q->samples_per_channel != 256 && q->samples_per_channel != 512 && q->samples_per_channel != 1024) { -- To stop receiving notification emails like this one, please contact [email protected]. _______________________________________________ ffmpeg-cvslog mailing list -- [email protected] To unsubscribe send an email to [email protected]
