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

Git pushed a commit to branch master
in repository ffmpeg.

commit 219df9ea0037bdeef6ef425905ec0026bb58e33a
Author:     Michael Niedermayer <[email protected]>
AuthorDate: Wed Nov 11 22:45:24 2026 +0100
Commit:     michaelni <[email protected]>
CommitDate: Sun Nov 15 20:23:39 2026 +0000

    avformat/rtmpdh: leave freeing the private key to ff_dh_free()
    
    Fixes: double free
    Fixes: QqzZphPWboPU
    
    Found during the review of https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/25059
    
    Double free Replicated through Modified FFmpeg with ASAN
---
 libavformat/rtmpdh.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/libavformat/rtmpdh.c b/libavformat/rtmpdh.c
index 1ed1a52c49..f5ec9e15e3 100644
--- a/libavformat/rtmpdh.c
+++ b/libavformat/rtmpdh.c
@@ -238,10 +238,8 @@ static FFBigNum dh_generate_key(FF_DH *dh)
     bn_random(dh->priv_key, 8 * num_bytes);
 
     bn_new(dh->pub_key);
-    if (!dh->pub_key) {
-        bn_free(dh->priv_key);
+    if (!dh->pub_key)
         return NULL;
-    }
 
     if (bn_modexp(dh->pub_key, dh->g, dh->priv_key, dh->p) < 0)
         return NULL;

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