diff --git a/ext/sockets/sockets.c b/ext/sockets/sockets.c index 86b7f046945..0e11280c914 100644 --- a/ext/sockets/sockets.c +++ b/ext/sockets/sockets.c @@ -1717,7 +1717,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(); }