tony2001                Mon May  4 14:25:17 2009 UTC

  Modified files:              (Branch: PHP_5_3)
    /php-src/main       network.c 
  Log:
  MFH: don't segfault on bindto == NULL
  
  
http://cvs.php.net/viewvc.cgi/php-src/main/network.c?r1=1.118.2.2.2.6.2.15&r2=1.118.2.2.2.6.2.16&diff_format=u
Index: php-src/main/network.c
diff -u php-src/main/network.c:1.118.2.2.2.6.2.15 
php-src/main/network.c:1.118.2.2.2.6.2.16
--- php-src/main/network.c:1.118.2.2.2.6.2.15   Mon May  4 13:09:15 2009
+++ php-src/main/network.c      Mon May  4 14:25:17 2009
@@ -17,7 +17,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: network.c,v 1.118.2.2.2.6.2.15 2009/05/04 13:09:15 iliaa Exp $ */
+/* $Id: network.c,v 1.118.2.2.2.6.2.16 2009/05/04 14:25:17 tony2001 Exp $ */
 
 /*#define DEBUG_MAIN_NETWORK 1*/
 
@@ -792,7 +792,7 @@
                switch (sa->sa_family) {
 #if HAVE_GETADDRINFO && HAVE_IPV6
                        case AF_INET6:
-                               if (strstr(bindto, ':')) {
+                               if (bindto && strstr(bindto, ':')) {
                                        ((struct sockaddr_in6 
*)sa)->sin6_family = sa->sa_family;
                                        ((struct sockaddr_in6 *)sa)->sin6_port 
= htons(port);
                                        socklen = sizeof(struct sockaddr_in6);



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to