https://bz.apache.org/bugzilla/show_bug.cgi?id=64015
Bug ID: 64015 Summary: Avoid BitSet at least in xslf Product: POI Version: unspecified Hardware: PC OS: Linux Status: NEW Severity: normal Priority: P2 Component: XSLF Assignee: dev@poi.apache.org Reporter: talli...@apache.org Target Milestone: --- On https://issues.apache.org/jira/browse/TIKA-3017, a user shared a 19kb pptx file that requires 2GB to parse or else throws an OOM. The problem appears to be that BitSet is horribly memory inefficient on large integers and there are some shape ids with very large numbers. Let's switch this to a simple HashSet and look for other BitSet oom vulnerabilities throughout the codebase. Executor task launch worker for task 47360 at java.lang.OutOfMemoryError.<init>()V (OutOfMemoryError.java:48) at java.util.Arrays.copyOf([JI)[J (Arrays.java:3308) at java.util.BitSet.ensureCapacity(I)V (BitSet.java:337) at java.util.BitSet.expandTo(I)V (BitSet.java:352) at java.util.BitSet.set(I)V (BitSet.java:447) at org.apache.poi.xslf.usermodel.XSLFSheet.registerShapeId(I)V (XSLFSheet.java:123) at org.apache.poi.xslf.usermodel.XSLFDrawing.<init> -- You are receiving this mail because: You are the assignee for the bug. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org For additional commands, e-mail: dev-h...@poi.apache.org