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

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

GitHub user kylape opened a pull request:

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

    [CXF-6115] TransferableFileInputStream.transferTo can cause infinite loo...

    ...p or stack overflow

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/kylape/cxf 2.7-cxf-6115

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/cxf/pull/32.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #32
    
----
commit 6869d72c66abbb44bff77a2bdc953822b918a654
Author: Kyle Lape <kyle.l...@redhat.com>
Date:   2014-11-25T01:37:44Z

    [CXF-6115] TransferableFileInputStream.transferTo can cause infinite loop 
or stack overflow

----


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