Skip to content

Commit

Permalink
fix condition
Browse files Browse the repository at this point in the history
  • Loading branch information
Girgias committed Dec 29, 2024
1 parent d1b19e7 commit 3e08a78
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ext/sockets/sockets.c
Original file line number Diff line number Diff line change
Expand Up @@ -1949,7 +1949,7 @@ PHP_FUNCTION(socket_set_option)
/* [...] the unique name of the TCP stack, and should be no longer than
* TCP_FUNCTION_NAME_LEN_MAX-1 characters in length.
* https://github.com/freebsd/freebsd-src/blob/da2c88dfcf4f425e6e0a58d6df3a7c8e88d8df92/share/man/man9/tcp_functions.9#L193C1-L194C50 */
if (Z_STRLEN_P(arg4) > TCP_FUNCTION_NAME_LEN_MAX) {
if (Z_STRLEN_P(arg4) >= TCP_FUNCTION_NAME_LEN_MAX) {
zend_argument_value_error(4, "must be less than %zu bytes when argument #3 ($option) is TCP_FUNCTION_BLK", TCP_FUNCTION_NAME_LEN_MAX);
RETURN_THROWS();
}
Expand Down

0 comments on commit 3e08a78

Please sign in to comment.