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
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
12 + 6 = ?
Subscribe to this entry?

 
 [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-2020 The PHP Group
All rights reserved.
Last updated: Fri Jul 03 11:01:25 2020 UTC