This is an automated email from the git hooks/post-receive script.

Git pushed a commit to branch release/9.0
in repository ffmpeg.

commit 820b0a21821b5c9eeaf15789f62b1e94dd12f7b5
Author:     Kenan Alghythee <[email protected]>
AuthorDate: Sat Jul 11 16:57:38 2026 +0200
Commit:     Michael Niedermayer <[email protected]>
CommitDate: Sun Aug 2 02:47:31 2026 +0200

    avcodec/dovi_rpuenc: validate vdr_rpu_id from the input metadata
    
    Fixes: out of array access
    Fixes: SUcVEyk7r3Gc
    Found-by: Kenan Alghythee <[email protected]>
    (cherry picked from commit 372a611913e6e2ba3d0fe859a00934f974f7d003)
    Signed-off-by: Michael Niedermayer <[email protected]>
---
 libavcodec/dovi_rpuenc.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/libavcodec/dovi_rpuenc.c b/libavcodec/dovi_rpuenc.c
index fe95bd4262..8b7a74f313 100644
--- a/libavcodec/dovi_rpuenc.c
+++ b/libavcodec/dovi_rpuenc.c
@@ -685,6 +685,10 @@ int ff_dovi_rpu_generate(DOVIContext *s, const 
AVDOVIMetadata *metadata,
         dv_md_compression = AV_DOVI_COMPRESSION_NONE;
 
     vdr_rpu_id = mapping->vdr_rpu_id;
+    if (vdr_rpu_id < 0 || vdr_rpu_id > DOVI_MAX_DM_ID) {
+        av_log(s->logctx, AV_LOG_ERROR, "Invalid VDR RPU id %d\n", vdr_rpu_id);
+        return AVERROR_INVALIDDATA;
+    }
     use_prev_vdr_rpu = 0;
 
     if (!s->vdr[vdr_rpu_id]) {

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

Reply via email to