Bug 62608

Summary: Regression in VBAMacroReader in 4.0.0-dev
Product: POI Reporter: Tim Allison <tallison>
Component: POI OverallAssignee: POI Developers List <dev>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P2    
Version: 4.0.x-dev   
Target Milestone: ---   
Hardware: PC   
OS: All   
Attachments: example .doc file

Description Tim Allison 2018-08-08 16:53:33 UTC
Created attachment 36078 [details]
example .doc file

In 3.17, we used to extract macros from some .doc and .xls files that are now triggering:

java.lang.StringIndexOutOfBoundsException: String index out of range: -1
	at java.lang.String.substring(String.java:1967)
	at org.apache.poi.poifs.macros.VBAMacroReader.readProjectProperties(VBAMacroReader.java:596)
	at org.apache.poi.poifs.macros.VBAMacroReader.findProjectProperties(VBAMacroReader.java:335)
	at org.apache.poi.poifs.macros.VBAMacroReader.findProjectProperties(VBAMacroReader.java:339)
	at org.apache.poi.poifs.macros.VBAMacroReader.readMacroModules(VBAMacroReader.java:115)
	at org.apache.poi.poifs.macros.VBAMacroReader.readMacros(VBAMacroReader.java:133)
Comment 1 Tim Allison 2018-08-08 17:30:19 UTC
r1837664