Skip to content

Commit 2efa0b3

Browse files
committed
Address path is 104 bytes on macOs compared to 108 on Linux
1 parent c425729 commit 2efa0b3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ext/sockets/sockets.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1719,7 +1719,7 @@ PHP_FUNCTION(socket_sendto)
17191719
case AF_UNIX:
17201720
memset(&s_un, 0, sizeof(s_un));
17211721
s_un.sun_family = AF_UNIX;
1722-
snprintf(s_un.sun_path, 108, "%s", addr);
1722+
snprintf(s_un.sun_path, sizeof(s_un.sun_path), "%s", addr);
17231723

17241724
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));
17251725
break;

0 commit comments

Comments
 (0)