Bug #66736 [Opn->Csd]: fpassthru broken

From: Date: Thu, 03 Apr 2014 08:42:06 +0000
Subject: Bug #66736 [Opn->Csd]: fpassthru broken
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-185056@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=66736&edit=1 ID: 66736 Updated by: mike@php.net Reported by: evert at rooftopsolutions dot nl Summary: fpassthru broken -Status: Open +Status: Closed Type: Bug Package: Streams related Operating System: OS X PHP Version: 5.5.9 Block user comment: N Private report: N New Comment: Automatic comment on behalf of mike Revision: http://git.php.net/?p=php-src.git;a=commit;h=d08b4dbf23febd3f305a2682b03ab9c70f11ac60 Log: Fix Bug #66736 fpassthru broken Previous Comments: ------------------------------------------------------------------------ [2014-02-18 19:49:37] evert at rooftopsolutions dot nl Description: ------------ fpassthru is broken for files > 2GB on 64bit systems. Tested with OS X, but also getting reports from users of other operating systems. Likely there's an integer overflow issue. Reference: http://evertpot.com/fpassthru-broken/ Test script: --------------- # 5GB file dd if=/dev/zero of=5gb bs=1024 count=5242880 php -r "fpassthru(fopen('5gb','r'));" > output_5gb # 3GB file dd if=/dev/zero of=3gb bs=1024 count=3145728 php -r "fpassthru(fopen('3gb','r'));" > output_3gb # Comparing outputs ls -lh Expected result: ---------------- -rw-r--r-- 1 evert staff 3.0G 18 Feb 14:43 3gb -rw-r--r-- 1 evert staff 5.0G 18 Feb 14:41 5gb -rw-r--r-- 1 evert staff 3.0G 18 Feb 14:45 output_3gb -rw-r--r-- 1 evert staff 5.0G 18 Feb 14:44 output_5gb Actual result: -------------- -rw-r--r-- 1 evert staff 3.0G 18 Feb 14:43 3gb -rw-r--r-- 1 evert staff 5.0G 18 Feb 14:41 5gb -rw-r--r-- 1 evert staff 0B 18 Feb 14:45 output_3gb -rw-r--r-- 1 evert staff 1.0G 18 Feb 14:44 output_5gb ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=66736&edit=1

« previous php.bugs (#185056) next »