]> git.sesse.net Git - vlc/commitdiff
Fixed httpd stack corruption.
authorLaurent Aimar <fenrir@videolan.org>
Sun, 25 Feb 2007 11:35:45 +0000 (11:35 +0000)
committerLaurent Aimar <fenrir@videolan.org>
Sun, 25 Feb 2007 11:35:45 +0000 (11:35 +0000)
(Fixed 'assert (pufd < ufd + (sizeof (ufd) / sizeof (ufd[0])))' reported
 by xxcv)

src/network/httpd.c

index e8725038f60442c8b8ef22c779719a6813766d82..7bd37020a92663cf9d7a0f7553bfe87c02529ace 100644 (file)
@@ -2035,7 +2035,7 @@ static void httpd_HostThread( httpd_host_t *host )
         if( ( p_tls == NULL ) && ( host->p_tls != NULL ) )
             p_tls = tls_ServerSessionPrepare( host->p_tls );
 
-        struct pollfd ufd[host->nfd + host->i_client];
+        struct pollfd ufd[host->nfd + host->i_client + host->nfd]; /* We have nfd listening sockets, i_client, and lay accept up to nfd new client */
         unsigned nfd;
         for (nfd = 0; nfd < host->nfd; nfd++)
         {