poi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject [Bug 58499] ZipSecureFile throws zip bomb detected
Date Fri, 16 Oct 2015 17:42:26 GMT
https://bz.apache.org/bugzilla/show_bug.cgi?id=58499

--- Comment #3 from Mirek <M.Hankus@netpr.pl> ---
Sorry - I was mistaken with root cause. My problem can be reproduced with such
test


try (OutputStream os = new NullOutputStream()) {
            SXSSFWorkbook workbook = new SXSSFWorkbook();
            Sheet sheet = workbook.createSheet();
            for (int i = 0; i < 900; i++) {
                Row r = sheet.createRow(i);
                Cell c = r.createCell(0);
                CellStyle cs = workbook.createCellStyle();
                c.setCellStyle(cs);
                c.setCellValue("AAA");                
            }
            workbook.write(os);
            workbook.dispose();
}


This code will throw zip bomb exception.  Adding
ZipSecureFile.setMinInflationRatio(0) eliminates this problem. You can close
this issue.

-- 
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


Mime
View raw message