summaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
authorVille Hukkamaki <vhu@iki.fi>2018-08-28 23:26:13 +0200
committerJoe Watkins <krakjoe@php.net>2018-09-04 11:12:04 +0200
commit0f724453c03b7ff500563c019f5dab736d326ad8 (patch)
treeb9cb12d8b0afc1adf802a8a5307f84ed7581488f /main
parente58690a26d5e3800c26d24ea30d4e5a1367f096d (diff)
downloadphp-git-0f724453c03b7ff500563c019f5dab736d326ad8.tar.gz
Fix bug #74764 and add a test case
Diffstat (limited to 'main')
-rw-r--r--main/network.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/main/network.c b/main/network.c
index 8a326369a8..145911db00 100644
--- a/main/network.c
+++ b/main/network.c
@@ -863,6 +863,9 @@ php_socket_t php_network_connect_socket_to_host(const char *host, unsigned short
int local_address_len = 0;
if (sa->sa_family == AF_INET) {
+ if (strchr(bindto,':')) {
+ goto skip_bind;
+ }
struct sockaddr_in *in4 = emalloc(sizeof(struct sockaddr_in));
local_address = (struct sockaddr*)in4;