Commit d42cb19259 for ffmpeg
commit d42cb1925987cc27899441ce39fa7bd2647dc72e
Author: Michael Niedermayer <michael@niedermayer.cc>
Date: Tue Nov 3 04:46:19 2026 +0100
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)
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;