php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #7310 Error in php_read() function in file ext/sockets/socket.c
Submitted: 2000-10-18 08:29 UTC Modified: 2000-11-23 22:56 UTC
From: mmlynarcik at charmed dot sk Assigned: chrisv (profile)
Status: Closed Package: Sockets related
PHP Version: 4.0.3pl1 OS: Slackware Linux 7.1
Private report: No CVE-ID: None
 [2000-10-18 08:29 UTC] mmlynarcik at charmed dot sk
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

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-10-22 04:14 UTC] chrisv@php.net
Try with the current CVS version, I made some changes to that particular function to change that behavior.
 [2000-11-23 22:56 UTC] chrisv@php.net
No reply to report, bug believed fixed in current CVS. Closing report; reopen if bug persists.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 23 20:01:29 2024 UTC