You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-04 22:03:09 +02:00
avcodec/mmvideo: fix palette index
Fixes: 391935573/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MMVIDEO_fuzzer-4655048979709952 Fixes: out of array access Reviewed-by: Peter Ross <pross@xvid.org> Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user