From d42cb1925987cc27899441ce39fa7bd2647dc72e Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Tue, 3 Nov 2026 04:46:19 +0100 Subject: [PATCH] avcodec/sanm: apply the codec 23 LUT loaded from the frame Fixes: 4dmaFsb0C0KW Fixes: AISLE-2026-0150-00882 Fixes: use of uninitialized memory Use of uninitialized memory Replicated through UnModified FFmpeg with MSAN Found-by: Joshua Rogers (AISLE) --- libavcodec/sanm.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavcodec/sanm.c b/libavcodec/sanm.c index 749d003a1b..041466b210 100644 --- a/libavcodec/sanm.c +++ b/libavcodec/sanm.c @@ -797,6 +797,7 @@ static int old_codec23(SANMVideoContext *ctx, GetByteContext *gb, int top, int l if (bytestream2_get_bytes_left(gb) < 256) return AVERROR_INVALIDDATA; bytestream2_get_bufferu(gb, ctx->c23lut, 256); + memcpy(lut, ctx->c23lut, 256); } else if (param2 < 256) { for (i = 0; i < 256; i++) lut[i] = (i + param2) & 0xff;