https://bz.apache.org/bugzilla/show_bug.cgi?id=69924
Bug ID: 69924
Summary: ArrayIndexOutOfBoundsException in HwmfHeader
constructor
Product: POI
Version: unspecified
Hardware: PC
Status: NEW
Severity: normal
Priority: P2
Component: POI Overall
Assignee: [email protected]
Reporter: [email protected]
Target Milestone: ---
Created attachment 40143
--> https://bz.apache.org/bugzilla/attachment.cgi?id=40143&action=edit
in image2.wmf there
ArrayIndexOutOfBoundsException: Index 62975 out of bounds for length 2
at org.apache.poi.hwmf.record.HwmfHeader.<init>(HwmfHeader.java:46)
at
org.apache.poi.hwmf.usermodel.HwmfPicture.<init>(HwmfPicture.java:93)
at org.apache.tika.parser.microsoft.WMFParser.parse(WMFParser.java:66)
It is in the line
type = HwmfHeaderMetaType.values()[leis.readUShort()-1];
might be fixed somewhat like this:
int idx = leis.readUShort()-1;
if (idx >= HwmfHeaderMetaType.values().length)
throw new IOException("index " + idx + " higher than HwmfHeaderMetaType
count");
type = HwmfHeaderMetaType.values()[idx];
this way you'd get a checked exception.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]