[vlc-commits] Revert "gnutls: don't break if ALPN extension is not available"

Rémi Denis-Courmont git at videolan.org
Sat Aug 30 10:51:37 CEST 2014


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Aug 30 11:51:26 2014 +0300| [b7202f1b8e6d701c03d4045a20ea5ca221611075] | committer: Rémi Denis-Courmont

Revert "gnutls: don't break if ALPN extension is not available"

This reverts commit ca41ed3fb28503ad1d0b6fbe1badaf21d940159e.
This fixes undefined memory usage.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=b7202f1b8e6d701c03d4045a20ea5ca221611075
---

 modules/misc/gnutls.c |    8 --------
 1 file changed, 8 deletions(-)

diff --git a/modules/misc/gnutls.c b/modules/misc/gnutls.c
index 18e1985..7f40125 100644
--- a/modules/misc/gnutls.c
+++ b/modules/misc/gnutls.c
@@ -198,7 +198,6 @@ static int gnutls_SessionOpen (vlc_tls_t *tls, int type,
         goto error;
     }
 
-#ifdef GNUTLS_ALPN_MAND
     if (alpn != NULL)
     {
         gnutls_datum_t *protv = NULL;
@@ -223,9 +222,6 @@ static int gnutls_SessionOpen (vlc_tls_t *tls, int type,
         val = gnutls_alpn_set_protocols (session, protv, protc, 0);
         free (protv);
     }
-#else
-    VLC_UNUSED(alpn);
-#endif
 
     gnutls_transport_set_int (session, fd);
 
@@ -279,7 +275,6 @@ static int gnutls_ContinueHandshake (vlc_tls_t *tls, char **restrict alp)
     return -1;
 
 done:
-#ifdef GNUTLS_ALPN_MAND
     if (alp != NULL)
     {
         gnutls_datum_t datum;
@@ -297,9 +292,6 @@ done:
         else
             *alp = NULL;
     }
-#else
-    VLC_UNUSED(alp);
-#endif
     return 0;
 }
 



More information about the vlc-commits mailing list