diff options
-rw-r--r-- | ext/sockets/sockets.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/sockets/sockets.c b/ext/sockets/sockets.c index b4f5da6b01..2f0184097f 100644 --- a/ext/sockets/sockets.c +++ b/ext/sockets/sockets.c @@ -1719,7 +1719,7 @@ PHP_FUNCTION(socket_sendto) case AF_UNIX: memset(&s_un, 0, sizeof(s_un)); s_un.sun_family = AF_UNIX; - snprintf(s_un.sun_path, 108, "%s", addr); + snprintf(s_un.sun_path, sizeof(s_un.sun_path), "%s", addr); retval = sendto(php_sock->bsd_socket, buf, ((size_t)len > buf_len) ? buf_len : (size_t)len, flags, (struct sockaddr *) &s_un, SUN_LEN(&s_un)); break; |