[ 
https://issues.apache.org/jira/browse/CXF-6115?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14244756#comment-14244756
 ] 

ASF GitHub Bot commented on CXF-6115:
-------------------------------------

Github user kylape closed the pull request at:

    https://github.com/apache/cxf/pull/31


> Transferable.transferTo can cause infinite loop or stack overflow
> -----------------------------------------------------------------
>
>                 Key: CXF-6115
>                 URL: https://issues.apache.org/jira/browse/CXF-6115
>             Project: CXF
>          Issue Type: Bug
>    Affects Versions: 3.1.0
>            Reporter: Kyle Lape
>            Assignee: Sergey Beryozkin
>             Fix For: 3.1.0, 3.0.3, 2.7.14
>
>
> When calling {{transferTo}} and the {{renameTo}} method returns {{false}}, 
> the current alternative in the code is very likely to throw a 
> {{StackOverflowError}} or cause the JVM to run out of file handles.
> Example stack trace:
> {noformat}
> 17:12:40,776 ERROR [com.redhat.gss.mtom.HashServer] (http-/127.0.0.1:8080-1) 
> : java.io.IOException: Cached file was deleted, 
> java.io.FileNotFoundException: /tmp/cxf-tmp-747794/cos2503467255223534504tmp 
> (Too many open files)
>       at 
> org.apache.cxf.io.CachedOutputStream.getInputStream(CachedOutputStream.java:546)
>  [cxf-api-2.7.12.SP1-redhat-1.jar:2.7.12.SP1-redhat-1]
>       at 
> org.apache.cxf.io.CachedOutputStream$TransferableFileInputStream.transferTo(CachedOutputStream.java:683)
>  [cxf-api-2.7.12.SP1-redhat-1.jar:2.7.12.SP1-redhat-1]
>       at org.apache.cxf.helpers.IOUtils.transferTo(IOUtils.java:212) 
> [cxf-api-2.7.12.SP1-redhat-1.jar:2.7.12.SP1-redhat-1]
>       at 
> org.apache.cxf.io.CachedOutputStream$TransferableFileInputStream.transferTo(CachedOutputStream.java:683)
>  [cxf-api-2.7.12.SP1-redhat-1.jar:2.7.12.SP1-redhat-1]
>       at org.apache.cxf.helpers.IOUtils.transferTo(IOUtils.java:212) 
> [cxf-api-2.7.12.SP1-redhat-1.jar:2.7.12.SP1-redhat-1]
>       at 
> org.apache.cxf.io.CachedOutputStream$TransferableFileInputStream.transferTo(CachedOutputStream.java:683)
>  [cxf-api-2.7.12.SP1-redhat-1.jar:2.7.12.SP1-redhat-1]
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to