Doc #72505 [Opn->Csd]: readfile() mangles files larger than 2G
| From: | laruence@php.net | Date: | Tue, 28 Jun 2016 03:12:40 +0000 |
| Subject: | Doc #72505 [Opn->Csd]: readfile() mangles files larger than 2G | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-13641@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
Updated by: laruence@php.net
Reported by: mueller at relog dot ch
Summary: readfile() mangles files larger than 2G
-Status: Open
+Status: Closed
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:
Automatic comment on behalf of laruence@gmail.com
Revision: http://git.php.net/?p=php-src.git;a=commit;h=c73a2f7f45fc4ad6bf45f5f6929606725f285cd7
Log: Fixed bug #72505 (readfile() mangles files larger than 2G)
Previous Comments:
------------------------------------------------------------------------
[2016-06-27 13:52:09] cschneid@php.net
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
------------------------------------------------------------------------
[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