Skip to content

Commit 3e08a78

Browse files
committed
fix condition
1 parent d1b19e7 commit 3e08a78

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
@@ -1949,7 +1949,7 @@ PHP_FUNCTION(socket_set_option)
19491949
/* [...] the unique name of the TCP stack, and should be no longer than
19501950
* TCP_FUNCTION_NAME_LEN_MAX-1 characters in length.
19511951
* https://github.com/freebsd/freebsd-src/blob/da2c88dfcf4f425e6e0a58d6df3a7c8e88d8df92/share/man/man9/tcp_functions.9#L193C1-L194C50 */
1952-
if (Z_STRLEN_P(arg4) > TCP_FUNCTION_NAME_LEN_MAX) {
1952+
if (Z_STRLEN_P(arg4) >= TCP_FUNCTION_NAME_LEN_MAX) {
19531953
zend_argument_value_error(4, "must be less than %zu bytes when argument #3 ($option) is TCP_FUNCTION_BLK", TCP_FUNCTION_NAME_LEN_MAX);
19541954
RETURN_THROWS();
19551955
}

0 commit comments

Comments
 (0)