aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2024-12-02 00:24:53 +0100
committerMichael Niedermayer <michael@niedermayer.cc>2024-12-04 04:23:49 +0100
commit61cbcaf93f3b2e10124f4c63ce7cd8dad6505fb2 (patch)
tree5cfbc6ba699efe6b09b6786cb9cb28640ecc3cc0
parent559d435fa39f18d54867d609fea97f9736caf73a (diff)
downloadffmpeg-61cbcaf93f3b2e10124f4c63ce7cd8dad6505fb2.tar.gz
avcodec/rv60dec: Check qp for intra
The rv60_qp_to_idx table only supports qp up to 31 on intra Fixes: global-buffer-overflow Fixes: 377543818/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_RV60_fuzzer-5160167345291264 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Reviewed-by: Peter Ross <pross@xvid.org> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavcodec/rv60dec.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/rv60dec.c b/libavcodec/rv60dec.c
index 64fa72d8f2..449650223d 100644
--- a/libavcodec/rv60dec.c
+++ b/libavcodec/rv60dec.c
@@ -1779,6 +1779,8 @@ static int decode_cu_r(RV60Context * s, AVFrame * frame, ThreadContext * thread,
ttype = cu.pu_type == PU_FULL ? TRANSFORM_8X8 : TRANSFORM_4X4;
is_intra = cu.cu_type == CU_INTRA;
+ if (is_intra && qp >= 32)
+ return AVERROR_INVALIDDATA;
cu_pos = ((xpos & 63) >> 3) + ((ypos & 63) >> 3) * 8;
switch (ttype) {