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 1a663c3d3000294df83ccaa4404db50610600449
Author:     Sylvestre Ledru <[email protected]>
AuthorDate: Mon Nov 9 11:29:30 2026 +0100
Commit:     Michael Niedermayer <[email protected]>
CommitDate: Sun Nov 15 06:17:20 2026 +0100

    avcodec/libvpxenc: fix HDR10+ side data leak on OOM in frame_data_submit()
    
    If av_buffer_ref() fails for the SMPTE 2094 APP5 metadata, the function
    returned directly and leaked the HDR10+ buffer reference taken just
    before. Go through the fail label so frame_data_uninit() releases it.
    
    Regression since e1797cdd51 (avcodec/libvpxenc: Copy Smpte2094App5 
metadata).
    Noticed while reviewing Coverity (Firefox CID 1701832), which is itself
    a false positive: it reports fd.hdr_smpte2094_app5 as leaked on the
    success path, where ownership is transferred to the FIFO.
    
    (cherry picked from commit 0bf7924a04eb205a8ca5d8206d66984ba80d15c9)
    Signed-off-by: Michael Niedermayer <[email protected]>
---
 libavcodec/libvpxenc.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/libavcodec/libvpxenc.c b/libavcodec/libvpxenc.c
index 942e28dd73..076cbc0fe3 100644
--- a/libavcodec/libvpxenc.c
+++ b/libavcodec/libvpxenc.c
@@ -387,8 +387,10 @@ static int frame_data_submit(AVCodecContext *avctx, AVFifo 
*fifo,
     sd = av_frame_get_side_data(frame, 
AV_FRAME_DATA_DYNAMIC_HDR_SMPTE_2094_APP5);
     if (sd) {
         fd.hdr_smpte2094_app5 = av_buffer_ref(sd->buf);
-        if (!fd.hdr_smpte2094_app5)
-            return AVERROR(ENOMEM);
+        if (!fd.hdr_smpte2094_app5) {
+            ret = AVERROR(ENOMEM);
+            goto fail;
+        }
     }
 
     fd.duration     = frame->duration;

-- 
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