Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-3889

OOM when uploading files greater than 2GB

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.4.3
    • 2.5
    • Core
    • None
    • All environments

    • Novice

    Description

      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 }

      Attachments

        Activity

          People

            dkulp Daniel Kulp
            ar_narayanan Narayanan Arunachalam
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 24h
                24h
                Remaining:
                Remaining Estimate - 24h
                24h
                Logged:
                Time Spent - Not Specified
                Not Specified