[FFmpeg-devel] [PATCH 3/6] avcodec/rv60dec: Check qp for intra
Peter Ross
pross at xvid.org
Mon Dec 2 03:20:21 EET 2024
On Mon, Dec 02, 2024 at 12:24:53AM +0100, Michael Niedermayer wrote:
> 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
> Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> ---
> libavcodec/rv60dec.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/libavcodec/rv60dec.c b/libavcodec/rv60dec.c
> index 64fa72d8f20..449650223d8 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;
nice find by clusterfuzz. please apply
-- Peter
(A907 E02F A6E5 0CD2 34CD 20D2 6760 79C5 AC40 DD6B)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20241202/069e126f/attachment.sig>
More information about the ffmpeg-devel
mailing list