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:
parent
aeea2defe4
commit
43926e026d
1 changed files with 1 additions and 1 deletions
|
|
@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue