You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by bu...@apache.org on 2021/06/11 11:37:57 UTC

[Bug 65372] New: Not able to open files generated due to uncompressed size over 4GB

https://bz.apache.org/bugzilla/show_bug.cgi?id=65372

            Bug ID: 65372
           Summary: Not able to open files generated due to uncompressed
                    size over 4GB
           Product: POI
           Version: 5.0.x-dev
          Hardware: PC
            Status: NEW
          Severity: normal
          Priority: P2
         Component: XSSF
          Assignee: dev@poi.apache.org
          Reporter: bgunics@talend.com
  Target Milestone: ---

I'm raising this ticket as we're using Apache POI in our product and some
customers are generated very big files. Using Apache POI 4.x these files were
corrupted and excel had to repair them. With the 5.0 this is no longer an
issue.  (bug: https://bz.apache.org/bugzilla/show_bug.cgi?id=57342 )

When we're trying to open it back using Apache POI, we get the following error:
Caused by: java.io.IOException: Zip bomb detected! The file would exceed the
max size of the expanded data in the zip-file.
This may indicates that the file is used to inflate memory usage and thus could
pose a security risk.
You can adjust this limit via ZipSecureFile.setMaxEntrySize() if you need to
work with files which are very large.
Uncompressed size: 4294969726, Raw/compressed size: 356720128
Limits: MAX_ENTRY_SIZE: 4294967295, Entry: xl/worksheets/sheet1.xml

I built a version that allows the setMaxEntrySize to be greater than ~4GB and
was able to increase this value to 14GB and open the file without any problem.

Would it be possible to increase the limit?
https://github.com/apache/poi/blob/trunk/poi-ooxml/src/main/java/org/apache/poi/openxml4j/util/ZipSecureFile.java#L76 

Or can we use a different method to open the files?

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


[Bug 65372] Not able to open files generated due to uncompressed size over 4GB

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=65372

PJ Fanning <fa...@yahoo.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 OS|                            |All
         Resolution|---                         |FIXED

--- Comment #1 from PJ Fanning <fa...@yahoo.com> ---
I've applied a change to remove the 4Gb limit - will be part of POI 5.1.0

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org