This is an automated email from the git hooks/post-receive script. Git pushed a commit to branch release/9.1 in repository ffmpeg.
commit 6611d6e80540e7bfc566fc53a2e74d614d38a8bb Author: Michael Niedermayer <[email protected]> AuthorDate: Sat Nov 14 01:57:50 2026 +0100 Commit: Michael Niedermayer <[email protected]> CommitDate: Thu Nov 19 14:55:53 2026 +0100 avfilter/vf_colorchannelmixer: mask planar high bit depth samples to their depth Fixes: out of array read Fixes: yqhg3KTUAWGt Fixes: AISLE-2026-0166-00099 Found-by: Joshua Rogers (AISLE) Out of array read Replicated through UnModified FFmpeg with ASAN (cherry picked from commit faa9b9611895209c4771792409a1a362f927fe52) Signed-off-by: Michael Niedermayer <[email protected]> --- libavfilter/colorchannelmixer_template.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/libavfilter/colorchannelmixer_template.c b/libavfilter/colorchannelmixer_template.c index aed5c59cff..fa2091cacd 100644 --- a/libavfilter/colorchannelmixer_template.c +++ b/libavfilter/colorchannelmixer_template.c @@ -23,19 +23,23 @@ #undef pixel #undef cpixel #undef ROUND +#undef MASK_TO_DEPTH #if DEPTH == 8 #define pixel uint8_t #define cpixel int #define ROUND lrintf +#define MASK_TO_DEPTH(x) (x) #elif DEPTH == 16 #define pixel uint16_t #define cpixel int #define ROUND lrintf +#define MASK_TO_DEPTH(x) ((x) & ((1 << depth) - 1)) #else #define NOP(x) (x) #define pixel float #define cpixel float #define ROUND NOP +#define MASK_TO_DEPTH NOP #endif #undef fn @@ -67,10 +71,10 @@ static av_always_inline int fn(filter_slice_rgba_planar)(AVFilterContext *ctx, v for (int i = slice_start; i < slice_end; i++) { for (int j = 0; j < out->width; j++) { - const pixel rin = srcr[j]; - const pixel gin = srcg[j]; - const pixel bin = srcb[j]; - const pixel ain = have_alpha ? srca[j] : 0; + const pixel rin = MASK_TO_DEPTH(srcr[j]); + const pixel gin = MASK_TO_DEPTH(srcg[j]); + const pixel bin = MASK_TO_DEPTH(srcb[j]); + const pixel ain = have_alpha ? MASK_TO_DEPTH(srca[j]) : 0; cpixel rout, gout, bout; #if DEPTH == 32 -- 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]
