I've got a piece of code which is erroring when I attempt to get the Styles Table for an Excel file, using apache POIs XSSFReader. All I do, involving the file, is shown below:
XSSFReader reader = new XSSFReader(OPCPackage.open(excelFile.getPath(), PackageAccess.READ));
StylesTable table = reader.getStylesTable();
I get the following error:
Caused by: java.io.IOException: Zip bomb detected! The file would exceed certain limits which usually indicate that the file is used to inflate memory usage and thus could pose a security risk. You can adjust these limits via setMinInflateRatio() and setMaxEntrySize() if you need to work with files which exceed these limits. Counter: 1644067, cis.counter: 16384, ratio: 0.009965530601855033Limits: MIN_INFLATE_RATIO: 0.01, MAX_ENTRY_SIZE: 4294967295
I'm not sure how to tell if this is a false positive (Opening the file in excel it seems fine), and if so how to appropriately deal with this?