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

Git pushed a commit to branch master
in repository ffmpeg.

commit 28b92b9b2e7abeb70b0aa050138e6e4b7cc26aed
Author:     Aditya Banavi <[email protected]>
AuthorDate: Fri Mar 20 16:08:22 2026 +0000
Commit:     Jack Lau <[email protected]>
CommitDate: Wed May 27 11:39:32 2026 +0000

    avformat/tls_gnutls:fix crash when connecting to peer
    
    When ffmpeg whip client takes up dtls_active role when using gnutls,
    it tries to connect to the server over udp and intermittently crashes.
    This is because s->host is NULL, and ffmpeg is in ice controlling mode.
    The gnutls api - gnutls_server_name_set() crashes if the hostname is NULL.
    
    This commit assigns valid value to s->host in such scenarios.
    
    Signed-off-by: Aditya Banavi <[email protected]>
---
 libavformat/tls_gnutls.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/libavformat/tls_gnutls.c b/libavformat/tls_gnutls.c
index 75ec83d22d..8ab691b2db 100644
--- a/libavformat/tls_gnutls.c
+++ b/libavformat/tls_gnutls.c
@@ -31,6 +31,7 @@
 #include "url.h"
 #include "tls.h"
 #include "libavutil/intreadwrite.h"
+#include "libavutil/mem.h"
 #include "libavutil/opt.h"
 #include "libavutil/thread.h"
 #include "libavutil/random_seed.h"
@@ -539,6 +540,9 @@ static int tls_open(URLContext *h, const char *uri, int 
flags, AVDictionary **op
     if (!s->external_sock) {
         if ((ret = ff_tls_open_underlying(s, h, uri, options)) < 0)
             goto fail;
+    } else if (!s->host) {
+        if ((ret = ff_tls_parse_host(s, s->underlying_host, 
sizeof(s->underlying_host), NULL, uri)) < 0)
+            goto fail;
     }
 
     gnutls_certificate_allocate_credentials(&c->cred);

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

Reply via email to