Skip to content

Commit ce026fb

Browse files
committed
changes from feedback / trying to enable test on 32 bits
1 parent c82e151 commit ce026fb

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

ext/sockets/sockets.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1249,7 +1249,7 @@ PHP_FUNCTION(socket_strerror)
12491249
ZEND_PARSE_PARAMETERS_END();
12501250

12511251
if (arg1 <= INT_MIN || arg1 > INT_MAX) {
1252-
zend_argument_value_error(1, "must be greater than %d and lower than %d", INT_MIN, INT_MAX);
1252+
zend_argument_value_error(1, "must be between %d and %d", (INT_MIN + 1), INT_MAX);
12531253
RETURN_THROWS();
12541254
}
12551255

ext/sockets/tests/gh16267.phpt

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
GH-16267 - overflow on socket_strerror argument
33
--EXTENSIONS--
44
sockets
5-
--SKIPIF--
6-
<?php if (PHP_INT_SIZE != 8) die('skip 64-bit only'); ?>
75
--FILE--
86
<?php
97
try {
@@ -18,5 +16,5 @@ try {
1816
}
1917
?>
2018
--EXPECTF--
21-
socket_strerror(): Argument #1 ($error_code) must be greater than %s and lower than %s
22-
socket_strerror(): Argument #1 ($error_code) must be greater than %s and lower than %s
19+
socket_strerror(): Argument #1 ($error_code) must be between %s and %d
20+
socket_strerror(): Argument #1 ($error_code) must be between %s and %d

0 commit comments

Comments
 (0)