summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2022-06-26 00:59:15 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2022-10-09 22:15:39 +0200
commitf9afd5caccc33e8c82c12346b7b5e08db2192fee (patch)
treec5bee57bc731ef4936c2e04fc165734f91ec4cd6
parentf7b403bba6fd10aaf6bdf9dffd786d95a1748236 (diff)
downloadffmpeg-f9afd5caccc33e8c82c12346b7b5e08db2192fee.tar.gz
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> (cherry picked from commit e690d4edf581c42dbd907c0fafe53fba86a00812) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavcodec/qpeldsp.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/libavcodec/qpeldsp.c b/libavcodec/qpeldsp.c
index 6e52b33657..d99b8fd0ba 100644
--- a/libavcodec/qpeldsp.c
+++ b/libavcodec/qpeldsp.c
@@ -198,7 +198,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); \
} \
@@ -208,7 +208,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); \
} \
\
@@ -218,7 +218,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); \
} \
@@ -458,7 +458,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); \
} \
@@ -468,7 +468,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); \
} \
\
@@ -478,7 +478,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); \
} \