summaryrefslogtreecommitdiff
path: root/main/streams
diff options
context:
space:
mode:
authorIlia Alshanetsky <iliaa@php.net>2012-03-03 20:36:14 +0000
committerIlia Alshanetsky <iliaa@php.net>2012-03-03 20:36:14 +0000
commit0fe734b7c89a914de91ed046ac65848580569a6e (patch)
tree34dc34a7b677c94443ef32d25ae9eb68ed1e9bdd /main/streams
parent3e7792aed7b6a8473e83bdb2417bbeefa009f65c (diff)
downloadphp-git-0fe734b7c89a914de91ed046ac65848580569a6e.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 0f3071971a..8d1c423da7 100644
--- a/main/streams/xp_socket.c
+++ b/main/streams/xp_socket.c
@@ -514,6 +514,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);