Doc #72505 [PATCH]: readfile() mangles files larger than 2G
| From: | cschneid@php.net | Date: | Mon, 27 Jun 2016 13:52:09 +0000 |
| Subject: | Doc #72505 [PATCH]: readfile() mangles files larger than 2G | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-13638@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=72505&edit=1
ID: 72505
Patch added by: cschneid@php.net
Reported by: mueller at relog dot ch
Summary: readfile() mangles files larger than 2G
Status: Open
Type: Documentation Problem
Package: Filesystem function related
Operating System: SuSE linux
PHP Version: 7.0.8
Block user comment: N
Private report: N
New Comment:
The following patch has been added/updated:
Patch Name: readfile_largefile.patch
Revision: 1467035528
URL: https://bugs.php.net/patch-display.php?bug=72505&patch=readfile_largefile.patch&revision=1467035528
Previous Comments:
------------------------------------------------------------------------
[2016-06-27 13:19:59] mueller at relog dot ch
Please change status to "Private rerport: Yes" if possible, thanks.
------------------------------------------------------------------------
[2016-06-27 12:49:17] mueller at relog dot ch
Email address is not well protected...
------------------------------------------------------------------------
[2016-06-27 12:48:02] mueller at search dot ch
Fixed Bug Type
------------------------------------------------------------------------
[2016-06-27 12:41:30] mueller at relog dot ch
Description:
------------
when readfile() is used to output a file larger than 2G, the output is not identical with the input.
Test script:
---------------
# output mangled for files larger than 2G
bash:> dd if=largefile of=aa bs=1M count=2049 2>/dev/null; php -r
'readfile("aa");' >bb; crc32 aa bb
b5c09ad4 aa
2e905867 bb
Expected result:
----------------
same crc32 for aa and bb (which is the case if you use count=2047)
Actual result:
--------------
different crc32 for aa and bb
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=72505&edit=1