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-385) FileUtils.doCopyFile can potentially loop for ever
Date Mon, 03 Jun 2013 21:10:20 GMT

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

Sebb resolved IO-385.
---------------------

       Resolution: Fixed
    Fix Version/s: 2.5

URL: http://svn.apache.org/r1489171
Log:
IO-385 FileUtils.doCopyFile can potentially loop for ever

Modified:
    commons/proper/io/trunk/src/changes/changes.xml
    commons/proper/io/trunk/src/main/java/org/apache/commons/io/FileUtils.java

                
> FileUtils.doCopyFile can potentially loop for ever
> --------------------------------------------------
>
>                 Key: IO-385
>                 URL: https://issues.apache.org/jira/browse/IO-385
>             Project: Commons IO
>          Issue Type: New Feature
>            Reporter: Sebb
>             Fix For: 2.5
>
>
> FileUtils.doCopyFile caches the input file size and only exits the loop once it has read
sufficient bytes.
> If the input file is truncated after obtaining the file size, the loop might never exit.
> One possible way round this might be to check whether anything has been transferred.
However, I don't know if it's possible for FileChannel.transferFrom() to temporarily return
0 when there is data available; if so that could cause some existing applications to break.

--
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