summaryrefslogtreecommitdiff
path: root/ext/sockets
diff options
context:
space:
mode:
authorfoobar <sniper@php.net>2001-03-22 13:16:58 +0000
committerfoobar <sniper@php.net>2001-03-22 13:16:58 +0000
commitf6e4cbd434a6d4a80cc2b30c409b19545d6ce27b (patch)
tree0f6f60f2c0ba60cb685317f426ca32a140fb5828 /ext/sockets
parent0f9503c92340b4ab8afecf8aa9c3d6e7aae37165 (diff)
downloadphp-git-f6e4cbd434a6d4a80cc2b30c409b19545d6ce27b.tar.gz
Fix bugs: #9920, #9190
Diffstat (limited to 'ext/sockets')
-rw-r--r--ext/sockets/sockets.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/ext/sockets/sockets.c b/ext/sockets/sockets.c
index d1528b464c..15114d8608 100644
--- a/ext/sockets/sockets.c
+++ b/ext/sockets/sockets.c
@@ -1130,6 +1130,7 @@ PHP_FUNCTION(bind)
if (sock_type->sa_family == AF_UNIX) {
struct sockaddr_un *sa = (struct sockaddr_un *) sock_type;
memset(sa, 0, sizeof(sa_storage)); /* This is safe -> sock_type = &sa_storage -> sa = sock_type */
+ sa->sun_family = AF_UNIX;
snprintf(sa->sun_path, 108, "%s", Z_STRVAL_PP(arg1));
ret = bind(Z_LVAL_PP(arg0), (struct sockaddr *) sa, SUN_LEN(sa));
} else if (sock_type->sa_family == AF_INET) {