#31633 [Opn->Csd]: stream_socket_accept segfaults when peername is used
| From: | dmitry@php.net | Date: | Fri, 21 Jan 2005 14:27:16 +0000 |
| Subject: | #31633 [Opn->Csd]: stream_socket_accept segfaults when peername is used | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-72594@lists.php.net to get a copy of this message | ||
ID: 31633
Updated by: dmitry@php.net
Reported By: ron at xit dot nl
-Status: Open
+Status: Closed
Bug Type: Sockets related
Operating System: Linux 2.4
PHP Version: 5.0.3
New Comment:
Already fixed in CVS (PHP_5_0 and HEAD).
Previous Comments:
------------------------------------------------------------------------
[2005-01-21 14:14:14] ron at xit dot nl
Description:
------------
When I use the optional peername parameter in stream_socket_accept()
the script segfaults. Everything works fine when I don't use this
parameter. The segfault occurs immediately when I call the function,
before any connection with a client can be established.
Reproduce code:
---------------
#!/usr/bin/php5
<?
$server = stream_socket_server("tcp://0.0.0.0:12345");
$client = stream_socket_accept($server, 3, $peername);
?>
Expected result:
----------------
nothing
Actual result:
--------------
Segmentation fault
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=31633&edit=1