diff options
| author | Antony Dovgal <tony2001@php.net> | 2009-05-04 14:25:17 +0000 |
|---|---|---|
| committer | Antony Dovgal <tony2001@php.net> | 2009-05-04 14:25:17 +0000 |
| commit | 7809cd64e8e1732fc97b9a185943986541a587e2 (patch) | |
| tree | 867fafe4161d6e1770764bd2c75b9c4755cfd6d5 | |
| parent | c412b949b9b448c2ac1242e46e8e0517390ffa17 (diff) | |
| download | php-git-7809cd64e8e1732fc97b9a185943986541a587e2.tar.gz | |
MFH: don't segfault on bindto == NULL
| -rw-r--r-- | main/network.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/main/network.c b/main/network.c index 4a2a6db74c..77c5d2f52a 100644 --- a/main/network.c +++ b/main/network.c @@ -792,7 +792,7 @@ php_socket_t php_network_connect_socket_to_host(const char *host, unsigned short 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); |
