commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sebb (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (IO-390) FileUtils.sizeOfDirectoryAsBigInteger can overflow
Date Wed, 10 Jul 2013 11:49:51 GMT

     [ https://issues.apache.org/jira/browse/IO-390?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Sebb resolved IO-390.
---------------------

       Resolution: Fixed
    Fix Version/s: 2.5

URL: http://svn.apache.org/r1501735
Log:
IO-390
FileUtils.sizeOfDirectoryAsBigInteger can overflow.
Ensure that recursive calls all use BigInteger

Modified:
    commons/proper/io/trunk/src/changes/changes.xml
    commons/proper/io/trunk/src/main/java/org/apache/commons/io/FileUtils.java
    commons/proper/io/trunk/src/test/java/org/apache/commons/io/FileUtilsTestCase.java
                
> FileUtils.sizeOfDirectoryAsBigInteger can overflow
> --------------------------------------------------
>
>                 Key: IO-390
>                 URL: https://issues.apache.org/jira/browse/IO-390
>             Project: Commons IO
>          Issue Type: Bug
>    Affects Versions: 2.4
>            Reporter: Sebb
>             Fix For: 2.5
>
>
> FileUtils.sizeOfDirectoryAsBigInteger can overflow.
> This is because it calls FileUtils.sizeOf(file) which calls sizeOfDirectory() for processing
subdirectories.
> As it stands, the method only works properly at the top level.
> A possible solution would be to create private "Big" versions of the called methods;
these would not need all the checks so should be faster.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message