PR #22253 opened by michaelni
URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/22253
Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/22253.patch

Fixes: Timeout
Fixes: 
476179563/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_THEORA_fuzzer-5231013478596608

Found-by: continuous fuzzing process 
https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <[email protected]>


>From 763ad93a06776631fbb503bf63c7c72f82f3eef3 Mon Sep 17 00:00:00 2001
From: Michael Niedermayer <[email protected]>
Date: Sun, 22 Feb 2026 01:20:29 +0100
Subject: [PATCH] avcodec/vp3: Sanity check cropping

Fixes: Timeout
Fixes: 
476179563/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_THEORA_fuzzer-5231013478596608

Found-by: continuous fuzzing process 
https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <[email protected]>
---
 libavcodec/vp3.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavcodec/vp3.c b/libavcodec/vp3.c
index 7ce54967e1..edb5594bde 100644
--- a/libavcodec/vp3.c
+++ b/libavcodec/vp3.c
@@ -2874,6 +2874,8 @@ static int theora_decode_header(AVCodecContext *avctx, 
GetBitContext *gb)
     if (av_image_check_size(visible_width, visible_height, 0, avctx) < 0 ||
         visible_width  + offset_x > s->width ||
         visible_height + offset_y > s->height ||
+        visible_width  + 512 < s->width  ||
+        visible_height + 512 < s->height ||
         visible_width < 18
     ) {
         av_log(avctx, AV_LOG_ERROR,
-- 
2.52.0

_______________________________________________
ffmpeg-devel mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to