diff options
author | twosee <twose@qq.com> | 2020-07-29 17:46:57 +0800 |
---|---|---|
committer | twosee <twose@qq.com> | 2020-07-29 17:46:57 +0800 |
commit | 12bd3cc14695bcdd2ffbbacfb37b5602c2288f95 (patch) | |
tree | 6a1f2bcd483a16eaed9dc91cc4ff27b99fdaae44 /main/streams | |
parent | e1f6ab3388f509782857557ee1e40a66b2bb6455 (diff) | |
parent | 0b8c83f5936581942715d14883cdebddc18bad30 (diff) | |
download | php-git-12bd3cc14695bcdd2ffbbacfb37b5602c2288f95.tar.gz |
Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
Handle bindto error
Diffstat (limited to 'main/streams')
-rw-r--r-- | main/streams/xp_socket.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/main/streams/xp_socket.c b/main/streams/xp_socket.c index 46b23b63ad..5313a84b72 100644 --- a/main/streams/xp_socket.c +++ b/main/streams/xp_socket.c @@ -750,6 +750,10 @@ static inline int php_tcp_sockop_connect(php_stream *stream, php_netstream_data_ return -1; } bindto = parse_ip_address_ex(Z_STRVAL_P(tmpzval), Z_STRLEN_P(tmpzval), &bindport, xparam->want_errortext, &xparam->outputs.error_text); + if (bindto == NULL) { + efree(host); + return -1; + } } #ifdef SO_BROADCAST |