php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #64565 copy doesn't report failure on partial copy
Submitted: 2013-04-02 14:12 UTC Modified: 2013-04-02 14:13 UTC
From: remi@php.net Assigned: remi (profile)
Status: Closed Package: Filesystem function related
PHP Version: 5.4.13 OS: GNU/Linux
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: remi@php.net
New email:
PHP Version: OS:

 

 [2013-04-02 14:12 UTC] remi@php.net
Description:
------------
When destination folder of a copy haven't enough place, copy reports success instead of failure.


Test script:
---------------
<?php
$file = "somefile";
$tmpdir = "/mnt/test/";

echo "Source: ".($src=filesize($file))."\n";

for ($i=0 ; $i<7 ; $i++) {
  $res = copy($file, $tmpdir.$i);
  $dst = filesize($tmpdir.$i);
  echo "$i:".($res ? ($dst==$src ? "ok" : "ISSUE ($dst/$src)") : "ko")."\n";
}


Expected result:
----------------
Source: 107520
0:ok
1:ok
2:ok
3:ok
4:ko
5:ko
6:ko


Actual result:
--------------
Source: 107520
0:ok
1:ok
2:ok
3:ok
4:ISSUE (49152/107520)
5:ko
6:ko


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2013-04-02 14:13 UTC] remi@php.net
-Assigned To: +Assigned To: remi
 [2013-04-02 14:24 UTC] remi@php.net
-Status: Assigned +Status: Closed
 [2013-04-02 14:24 UTC] remi@php.net
Automatic comment on behalf of remi
Revision: http://git.php.net/?p=php-src.git;a=commit;h=6b4148bc9705d2668dd8589009215a8eb3076f31
Log: Fixed Bug #64565 copy doesn't report failure on partial copy
 [2014-10-07 23:19 UTC] stas@php.net
Automatic comment on behalf of remi
Revision: http://git.php.net/?p=php-src-security.git;a=commit;h=6b4148bc9705d2668dd8589009215a8eb3076f31
Log: Fixed Bug #64565 copy doesn't report failure on partial copy
 [2014-10-07 23:30 UTC] stas@php.net
Automatic comment on behalf of remi
Revision: http://git.php.net/?p=php-src-security.git;a=commit;h=6b4148bc9705d2668dd8589009215a8eb3076f31
Log: Fixed Bug #64565 copy doesn't report failure on partial copy
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 23 08:01:30 2024 UTC