ID:               22753
 Updated by:       [EMAIL PROTECTED]
 Reported By:      hak at cooper dot edu
-Status:           Open
+Status:           Assigned
 Bug Type:         Reproducible crash
 Operating System: Linux 2.4
 PHP Version:      4CVS-2003-03-17 (stable)
-Assigned To:      
+Assigned To:      wez
 New Comment:

Assigned to Wez, must be fixed for PHP 4.3.2.



Previous Comments:
------------------------------------------------------------------------

[2003-03-17 14:42:38] hak at cooper dot edu

Diffing between 4.3.1 and Mar 13 STABLE it appears
you are already working on this bug.  In network.c:
php_sockop_write, you had previously declared didwrite
as size_t, which is unsigned on some OS (e.g. Linux).
Therefore, an error in the send system call was not
detected.  The STABLE release changes didwrite to an
int but in streams.c:_php_stream_write, the return
value still gets assigned into size_t justwrote, and
therefore you get stuck in an endless loop because the
check justwrote>0 i.e. (unsigned)0xFFFFFFFF>0 is true.

Fix is to either change justwrote to an int, or
to add the following to the end of sockop_write:
return didwrite<0?0:didwrite;

------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=22753&edit=1

Reply via email to