avcodec/qpeldsp: copy less for the mc0x cases

Fixes: out of array access
Fixes: 47936/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MPEG4_fuzzer-5745039940124672

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:
Michael Niedermayer 2022-06-26 00:59:15 +02:00
parent db31b3ea86
commit e690d4edf5
1 changed files with 6 additions and 6 deletions

View File

@ -199,7 +199,7 @@ static void OPNAME ## qpel8_mc01_c(uint8_t *dst, const uint8_t *src, \
uint8_t full[16 * 9]; \
uint8_t half[64]; \
\
copy_block9(full, src, 16, stride, 9); \
copy_block8(full, src, 16, stride, 9); \
put ## RND ## mpeg4_qpel8_v_lowpass(half, full, 8, 16); \
OPNAME ## pixels8_l2_8(dst, full, half, stride, 16, 8, 8); \
} \
@ -209,7 +209,7 @@ static void OPNAME ## qpel8_mc02_c(uint8_t *dst, const uint8_t *src, \
{ \
uint8_t full[16 * 9]; \
\
copy_block9(full, src, 16, stride, 9); \
copy_block8(full, src, 16, stride, 9); \
OPNAME ## mpeg4_qpel8_v_lowpass(dst, full, stride, 16); \
} \
\
@ -219,7 +219,7 @@ static void OPNAME ## qpel8_mc03_c(uint8_t *dst, const uint8_t *src, \
uint8_t full[16 * 9]; \
uint8_t half[64]; \
\
copy_block9(full, src, 16, stride, 9); \
copy_block8(full, src, 16, stride, 9); \
put ## RND ## mpeg4_qpel8_v_lowpass(half, full, 8, 16); \
OPNAME ## pixels8_l2_8(dst, full + 16, half, stride, 16, 8, 8); \
} \
@ -459,7 +459,7 @@ static void OPNAME ## qpel16_mc01_c(uint8_t *dst, const uint8_t *src, \
uint8_t full[24 * 17]; \
uint8_t half[256]; \
\
copy_block17(full, src, 24, stride, 17); \
copy_block16(full, src, 24, stride, 17); \
put ## RND ## mpeg4_qpel16_v_lowpass(half, full, 16, 24); \
OPNAME ## pixels16_l2_8(dst, full, half, stride, 24, 16, 16); \
} \
@ -469,7 +469,7 @@ static void OPNAME ## qpel16_mc02_c(uint8_t *dst, const uint8_t *src, \
{ \
uint8_t full[24 * 17]; \
\
copy_block17(full, src, 24, stride, 17); \
copy_block16(full, src, 24, stride, 17); \
OPNAME ## mpeg4_qpel16_v_lowpass(dst, full, stride, 24); \
} \
\
@ -479,7 +479,7 @@ static void OPNAME ## qpel16_mc03_c(uint8_t *dst, const uint8_t *src, \
uint8_t full[24 * 17]; \
uint8_t half[256]; \
\
copy_block17(full, src, 24, stride, 17); \
copy_block16(full, src, 24, stride, 17); \
put ## RND ## mpeg4_qpel16_v_lowpass(half, full, 16, 24); \
OPNAME ## pixels16_l2_8(dst, full + 24, half, stride, 24, 16, 16); \
} \