mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
avcodec/iff: Move index use after check in decodeplane8()
Fixes: index 9 out of bounds for type 'const uint64_t [8][256]' Fixes: 18409/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_IFF_ILBM_fuzzer-5767030560522240 Fixes: 18720/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_IFF_ILBM_fuzzer-5651995784642560 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
f09151fff9
commit
a1f8b36cc4
@ -456,11 +456,12 @@ static av_cold int decode_init(AVCodecContext *avctx)
|
|||||||
*/
|
*/
|
||||||
static void decodeplane8(uint8_t *dst, const uint8_t *buf, int buf_size, int plane)
|
static void decodeplane8(uint8_t *dst, const uint8_t *buf, int buf_size, int plane)
|
||||||
{
|
{
|
||||||
const uint64_t *lut = plane8_lut[plane];
|
const uint64_t *lut;
|
||||||
if (plane >= 8) {
|
if (plane >= 8) {
|
||||||
av_log(NULL, AV_LOG_WARNING, "Ignoring extra planes beyond 8\n");
|
av_log(NULL, AV_LOG_WARNING, "Ignoring extra planes beyond 8\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
lut = plane8_lut[plane];
|
||||||
do {
|
do {
|
||||||
uint64_t v = AV_RN64A(dst) | lut[*buf++];
|
uint64_t v = AV_RN64A(dst) | lut[*buf++];
|
||||||
AV_WN64A(dst, v);
|
AV_WN64A(dst, v);
|
||||||
|
Loading…
Reference in New Issue
Block a user