Bug 63812 - WMF should throw more informative exception on corrupt WMF
Summary: WMF should throw more informative exception on corrupt WMF
Status: NEW
Alias: None
Product: POI
Classification: Unclassified
Component: POI Overall (show other bugs)
Version: unspecified
Hardware: PC Linux
: P2 enhancement (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-10-07 14:05 UTC by Tim Allison
Modified: 2019-10-07 14:05 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tim Allison 2019-10-07 14:05:11 UTC
I'm getting a bunch more ArrayIndexOutOfBoundsExceptions in the regression tests of emf/wmf with specifically wmf files.

This line in HwmfHeader assumes that leis.readUShort()-1 assumes that the short-1 will be in the correct range.

this.type = HwmfHeader.HwmfHeaderMetaType.values()[leis.readUShort() - 1];

We should add a bounds check and throw a more informative exception.