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: dev@poi.apache.org
          Reporter: talli...@apache.org
  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: dev-unsubscr...@poi.apache.org
For additional commands, e-mail: dev-h...@poi.apache.org

Reply via email to