PHP 4.0 Bug #7310: Error in php_read() function in file ext/sockets/socket.c
| From: | mmlynarcik at charmed dot sk | Date: | Wed, 18 Oct 2000 12:29:23 +0000 |
| Subject: | PHP 4.0 Bug #7310: Error in php_read() function in file ext/sockets/socket.c | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-35414@lists.php.net to get a copy of this message | ||
From: mmlynarcik@charmed.sk
Operating system: Slackware Linux 7.1
PHP version: 4.0.3pl1
PHP Bug Type: Sockets related
Bug description: Error in php_read() function in file ext/sockets/socket.c
Problem is with third argument in this function ( for example $n). If you write script like this:
<?
// ... socket definisions ...
$ret = read($cur_sock, &$buf, 1);
?>
... then it recive one string but must be sent 2 characters from client( I try it with telnet ).
Then I look with my friend in source code and there is a bug because when it reads for frist time m
= 0, so it doesn't increment n. Thats why it reads one more character. Hope it was helpfull.
That's all folks, Milan Mlynarcik
--
Edit Bug report at: http://bugs.php.net/?id=7310&edit=1