Skip to content

Commit f119df3

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

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
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: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ GH-16267 - overflow on socket_strerror argument
33
--EXTENSIONS--
44
sockets
55
--SKIPIF--
6-
<?php if (PHP_INT_SIZE != 8) die('skip 64-bit only'); ?>
6+
<?php if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only"); ?>
77
--FILE--
88
<?php
99
try {
@@ -18,5 +18,5 @@ try {
1818
}
1919
?>
2020
--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
21+
socket_strerror(): Argument #1 ($error_code) must be between %s and %d
22+
socket_strerror(): Argument #1 ($error_code) must be between %s and %d

0 commit comments

Comments
 (0)