summaryrefslogtreecommitdiff
path: root/main/streams
diff options
context:
space:
mode:
authorIlia Alshanetsky <iliaa@php.net>2012-03-03 20:36:14 (GMT)
committerIlia Alshanetsky <iliaa@php.net>2012-03-03 20:36:14 (GMT)
commit5525d80982255831ee3a3371fce6c43c6263c5a0 (patch)
treed36a8396bfa702d4a537c7d4ee42c6c4e7004d72 /main/streams
parent9b9f05fd6e6222df986ea4024cabef4677850147 (diff)
downloadphp-5525d80982255831ee3a3371fce6c43c6263c5a0.tar.gz
Fixed bug #60106 (stream_socket_server silently truncates long unix socket paths)
Diffstat (limited to 'main/streams')
-rw-r--r--main/streams/xp_socket.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/main/streams/xp_socket.c b/main/streams/xp_socket.c
index d7a74bd..f23137f 100644
--- a/main/streams/xp_socket.c
+++ b/main/streams/xp_socket.c
@@ -510,6 +510,7 @@ static inline int parse_unix_address(php_stream_xport_param *xparam, struct sock
* BUT, to get into this branch of code, the name is too long,
* so we don't care. */
xparam->inputs.namelen = sizeof(unix_addr->sun_path) - 1;
+ php_error_docref(NULL TSRMLS_CC, E_NOTICE, "socket path exceeded the maximum allowed length of %ld bytes and was truncated", sizeof(unix_addr->sun_path));
}
memcpy(unix_addr->sun_path, xparam->inputs.name, xparam->inputs.namelen);