mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
update the existing checks to be more straightforward instead of counting on undefined behavior. close GH-17923
19 lines
390 B
PHP
19 lines
390 B
PHP
--TEST--
|
|
GH-16267 - overflow on socket_strerror argument
|
|
--EXTENSIONS--
|
|
sockets
|
|
--FILE--
|
|
<?php
|
|
$s_c_l = socket_create_listen(0);
|
|
var_dump(socket_read($s_c_l, PHP_INT_MAX));
|
|
var_dump(socket_read($s_c_l, PHP_INT_MIN));
|
|
$a = "";
|
|
var_dump(socket_recv($s_c_l, $a, PHP_INT_MAX, 0));
|
|
var_dump(socket_recv($s_c_l, $a, PHP_INT_MIN, 0));
|
|
?>
|
|
--EXPECT--
|
|
bool(false)
|
|
bool(false)
|
|
bool(false)
|
|
bool(false)
|