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 Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: mmlynarcik at charmed dot sk
New email:
PHP Version: OS:

 

 [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

Pull Requests

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: Sat Dec 21 11:01:30 2024 UTC