[FFmpeg-devel] [PATCH 1/7] avcodec/mmvideo: fix paltte index
Peter Ross
pross at xvid.org
Fri May 9 12:06:42 EEST 2025
On Thu, May 08, 2025 at 11:57:32PM +0200, Michael Niedermayer wrote:
> Fixes: 391935573/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MMVIDEO_fuzzer-4655048979709952
> Fixes: out of array access
>
> Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
> Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> ---
> libavcodec/mmvideo.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/libavcodec/mmvideo.c b/libavcodec/mmvideo.c
> index 7313507debc..2a0c855992e 100644
> --- a/libavcodec/mmvideo.c
> +++ b/libavcodec/mmvideo.c
> @@ -91,7 +91,7 @@ static void mm_decode_pal(MmContext *s)
> int start = bytestream2_get_le16(&s->gb);
> int count = bytestream2_get_le16(&s->gb);
> for (int i = 0; i < count; i++)
> - s->palette[start+i] = 0xFFU << 24 | (bytestream2_get_be24(&s->gb) << 2);
> + s->palette[(start+i)&0xFF] = 0xFFU << 24 | (bytestream2_get_be24(&s->gb) << 2);
> }
>
please apply
-- Peter
(A907 E02F A6E5 0CD2 34CD 20D2 6760 79C5 AC40 DD6B)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20250509/da9603a4/attachment.sig>
More information about the ffmpeg-devel
mailing list