OOM when uploading files greater than 2GB
-----------------------------------------

                 Key: CXF-3889
                 URL: https://issues.apache.org/jira/browse/CXF-3889
             Project: CXF
          Issue Type: Bug
          Components: Core
    Affects Versions: 2.4.3
         Environment: All environments
            Reporter: Narayanan Arunachalam


The totalLength field in org.apache.cxf.io.CachedOutputStream is declared as a 
int field, so when a file greater than 2GB is uploaded for a PUT operation, OOM 
is thrown.

When the file size is over 2GB the condition 'totalLength < limit' becomes true 
when it should not.

 public void writeCacheTo(StringBuilder out, String charsetName, int limit) 
throws IOException {
294        flush();
295        if (totalLength < limit
296            || limit == -1) {
297            writeCacheTo(out);
298            return;
299        }

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to