stream_get_contents offset max is 1165
| Bug #53006 | stream_get_contents offset max is 1165 | ||||
|---|---|---|---|---|---|
| Submitted: | 2010-10-07 01:09 UTC | Modified: | 2010-10-16 01:50 UTC | ||
| From: | poulpillusion at free dot fr | Assigned: | cataphract (profile) | ||
| Status: | Closed | Package: | Streams related | ||
| PHP Version: | 5.3.3 | OS: | Linux Aptosid | ||
| Private report: | No | CVE-ID: | None | ||
[2010-10-07 01:09 UTC] poulpillusion at free dot fr
Description: ------------ In the stream_get_contents function, the offset parameter's max value is 1165. Any upper value will block the script. Test script: --------------- // This will work... $handle = fopen($url, 'rb'); echo stream_get_contents($handle, 8192, 1165); // This will not work... the script will wait forever. $handle = fopen($url, 'rb'); echo stream_get_contents($handle, 8192, 1166); Expected result: ---------------- I expect this function not to wait if $offset + 8192 < $filesize
Patches
Pull Requests
History
AllCommentsChangesGit/SVN commits
[2010-10-07 14:05 UTC] cataphract@php.net
[2010-10-08 00:31 UTC] poulpillusion at free dot fr
-Status: Feedback +Status: Open
[2010-10-08 00:31 UTC] poulpillusion at free dot fr
[2010-10-08 02:29 UTC] cataphract@php.net
[2010-10-09 01:33 UTC] poulpillusion at free dot fr
-Status: Feedback +Status: Open
[2010-10-09 01:33 UTC] poulpillusion at free dot fr
[2010-10-11 17:15 UTC] cataphract@php.net
[2010-10-11 18:44 UTC] cataphract@php.net
[2010-10-13 23:59 UTC] poulpillusion at free dot fr
[2010-10-14 04:03 UTC] cataphract@php.net
[2010-10-14 05:15 UTC] cataphract@php.net
[2010-10-15 01:11 UTC] poulpillusion at free dot fr
-Status: Feedback +Status: Assigned