[Bug 63812] New: WMF should throw more informative exception on corrupt WMF

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[Bug 63812] New: WMF should throw more informative exception on corrupt WMF

Bugzilla from bugzilla@apache.org
https://bz.apache.org/bugzilla/show_bug.cgi?id=63812

            Bug ID: 63812
           Summary: WMF should throw more informative exception on corrupt
                    WMF
           Product: POI
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: POI Overall
          Assignee: [hidden email]
          Reporter: [hidden email]
  Target Milestone: ---

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.

--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]