diff options
Diffstat (limited to 'main/network.c')
-rw-r--r-- | main/network.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/main/network.c b/main/network.c index ee8567967f..2bc7c0eb0f 100644 --- a/main/network.c +++ b/main/network.c @@ -495,12 +495,15 @@ PHPAPI int php_network_parse_network_address_with_port(const char *addr, long ad if (*addr == '[') { colon = memchr(addr + 1, ']', addrlen-1); if (!colon || colon[1] != ':') { - return 0; + return FAILURE; } port = atoi(colon + 2); addr++; } else { colon = memchr(addr, ':', addrlen); + if (!colon || colon[1] != ':') { + return FAILURE; + } port = atoi(colon + 1); } |