Make a fix on 4.1.2 and a possible 4.1.3 release

Jithin T J <[email protected]> Fri, 28 Jul 2023 11:00:52 +0000
Newsgroups gmane.comp.jakarta.poi.user
Message-ID <DM6PR11MB4331669ECA4DF0380C3192C88206A@DM6PR11MB4331.namprd11.prod.outlook.com>
Hi,
There is a bug in IOUtils in 4.1.2 because of which large xlsx files whose zipEntry size is “-1” and the content length cross “Integer.MAX_VALUE – 2” will result in an OOM with message “Requested array size exceeds VM limit”(code ref<https://github.com/apache/poi/blob/30388294ec80ee4f5c914a916631bb77b5d5f86b/src/java/org/apache/poi/util/IOUtils.java#L185>).

I see that this is already fixed in later versions by restricting with “BYTE_ARRAY_MAX_OVERRIDE”. I would like to make this fix on top of 4.1.2 since we cannot upgrade to the latest version now.

Thanks ,
Jithin