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

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

commit 72eb8909e4f50b4dbddb31591cb3e8d292226059
Author:     Michael Niedermayer <[email protected]>
AuthorDate: Sun Oct 25 05:47:50 2026 +0100
Commit:     James Almer <[email protected]>
CommitDate: Wed Nov 11 12:44:39 2026 -0300

    avcodec/cbs_lcevc: append with position -1 in 
ff_cbs_lcevc_add_process_block()
    
    ff_cbs_lcevc_list_add() resolves a position of -1 to the end of the
    list, but the block was then set up at blocks[-1].
    
    Fixes: Am7oZsN0qfFR/testcase/cbs_lcevc_append.c
    Fixes: Am7oZsN0qfFR
    Fixes: out of array write
    Out of array write Replicated through API with ASAN
    
    Found during the review of PR 25408.
    
    Signed-off-by: Michael Niedermayer <[email protected]>
    (cherry picked from commit a88221d8df6585d5364bea674ece688ac7477d03)
---
 libavcodec/cbs_lcevc.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/libavcodec/cbs_lcevc.c b/libavcodec/cbs_lcevc.c
index 0beae6f6f1..05cc63431a 100644
--- a/libavcodec/cbs_lcevc.c
+++ b/libavcodec/cbs_lcevc.c
@@ -628,6 +628,9 @@ int ff_cbs_lcevc_add_process_block(CodedBitstreamContext 
*ctx,
     if (err < 0)
         return err;
 
+    if (position == -1)
+        position = list->nb_blocks;
+
     // Add a new block to the message list.
     err = ff_cbs_lcevc_list_add(list, position);
     if (err < 0)

-- 
To stop receiving notification emails like this one, please contact
[email protected].
_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to