diff --git a/ext/sockets/sockets.c b/ext/sockets/sockets.c index 64996a42429..838e99cdc13 100644 --- a/ext/sockets/sockets.c +++ b/ext/sockets/sockets.c @@ -1726,7 +1726,7 @@ PHP_FUNCTION(socket_sendto) case AF_UNIX: memset(&s_un, 0, sizeof(s_un)); - if (addr_len >= sizeof(s_un.sun_path)) { + if (ZSTR_LEN(addr) >= sizeof(s_un.sun_path)) { zend_argument_value_error(5, "must be less than %d", sizeof(s_un.sun_path)); RETURN_THROWS(); }