[FFmpeg-cvslog] avcodec/ffv1dec: Blow up if user asks for explosion

Michael Niedermayer git at videolan.org
Wed Sep 25 20:46:56 EEST 2024


ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Tue Sep 24 22:19:31 2024 +0200| [747e1a26afbb2b4eb367dce8ae186f776706f02c] | committer: Michael Niedermayer

avcodec/ffv1dec: Blow up if user asks for explosion

Fixes: Ticket8403

Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=747e1a26afbb2b4eb367dce8ae186f776706f02c
---

 libavcodec/ffv1dec.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/libavcodec/ffv1dec.c b/libavcodec/ffv1dec.c
index 415c66be63..0afdeabd91 100644
--- a/libavcodec/ffv1dec.c
+++ b/libavcodec/ffv1dec.c
@@ -354,6 +354,9 @@ static int decode_slice(AVCodecContext *c, void *arg)
         }
     }
 
+    if (sc->slice_damaged && (f->avctx->err_recognition & AV_EF_EXPLODE))
+        return AVERROR_INVALIDDATA;
+
     if ((c->active_thread_type & FF_THREAD_FRAME) && !f->frame_damaged)
         ff_progress_frame_report(&f->picture, si);
 



More information about the ffmpeg-cvslog mailing list