avcodec/cook: bound subpacket channel sum against channel count
authorDavid Korczynski <david@adalogics.com>
Thu, 21 May 2026 11:30:36 +0000 (04:30 -0700)
committerMichael Niedermayer <michael@niedermayer.cc>
Sat, 13 Jun 2026 16:31:36 +0000 (18:31 +0200)
commite27a7df1e1af97bf56230db21bd60b642fff3941
treef950ca8bfa35b0ea003d95f7e80a9f15d1d4967e
parentbae0b9a4491dc686217203d85e5c105f1944624c
avcodec/cook: bound subpacket channel sum against channel count

Fixes: out of array read
Fixes: evil.rm

Found-by: Anthropic agents; validated and reported by Ada Logics.
Signed-off-by: David Korczynski <david@adalogics.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 1152139b4898888f7ca3daa1caca715c87dc1e85)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavcodec/cook.c