]> git.sesse.net Git - vlc/commitdiff
Fixes invalid memory access in case of TLS handshake failure
authorRémi Denis-Courmont <rem@videolan.org>
Thu, 3 Mar 2005 15:19:30 +0000 (15:19 +0000)
committerRémi Denis-Courmont <rem@videolan.org>
Thu, 3 Mar 2005 15:19:30 +0000 (15:19 +0000)
src/misc/httpd.c

index f43a9370882ede3971e12c805ea233e794381a76..c15c1c115df6ac90b5ead449f47d6e1f9ab3a31b 100644 (file)
@@ -1,7 +1,7 @@
 /*****************************************************************************
  * httpd.c
  *****************************************************************************
- * Copyright (C) 2004 VideoLAN
+ * Copyright (C) 2004-2005 VideoLAN
  * $Id$
  *
  * Authors: Laurent Aimar <fenrir@via.ecp.fr>
@@ -2478,7 +2478,6 @@ static void httpd_HostThread( httpd_host_t *host )
                 fcntl( fd, F_SETFL, O_NONBLOCK );
 #endif
 
-                /* FIXME: that MUST be non-blocking */
                 if( p_tls != NULL)
                 {
                     switch ( tls_SessionHandshake( p_tls, fd ) )
@@ -2487,6 +2486,7 @@ static void httpd_HostThread( httpd_host_t *host )
                             msg_Err( host, "Rejecting TLS connection" );
                             net_Close( fd );
                             fd = -1;
+                            p_tls = NULL;
                             break;
 
                         case 1: /* missing input - most likely */