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

 ID:                 54946
 Updated by:         bj...@php.net
 Reported by:        max at cxib dot net
 Summary:            stream_get_contents infinite loop
-Status:             Open
+Status:             Closed
 Type:               Feature/Change Request
 Package:            Streams related
 Operating System:   NetBSD
 PHP Version:        5.3.6
-Assigned To:        
+Assigned To:        bjori
 Block user comment: N
 Private report:     N

 New Comment:

This bug has been fixed in SVN.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.




Previous Comments:
------------------------------------------------------------------------
[2011-05-29 14:29:21] bj...@php.net

Automatic comment from SVN on behalf of bjori
Revision: http://svn.php.net/viewvc/?view=revision&revision=311545
Log: Fixed bug #54946 (stream_get_contents infinite loop)

------------------------------------------------------------------------
[2011-05-28 13:13:37] max at cxib dot net

Description:
------------
#0  0xbb80eb77 in read () from /usr/lib/libc.so.12

#1  0xbb8e0efd in read () from /usr/lib/libpthread.so.0

#2  0x083e7e81 in _php_stream_fopen_from_pipe ()

#3  0x083dff2f in _php_stream_free ()

#4  0x083e00ec in _php_stream_read ()

#5  0x083e1684 in _php_stream_copy_to_mem ()





php_stream_copy_to_mem() generate infinite loop



Test script:
---------------
<?php

$stream=fopen("/tmp/blabla", "w"); // w or a

stream_get_contents($stream,1,1);

?>

Expected result:
----------------
string or null

Actual result:
--------------
infinite loop


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



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

Reply via email to