pjfanning opened a new pull request, #1333:
URL: https://github.com/apache/poi/pull/1333

   Fixes https://bz.apache.org/bugzilla/show_bug.cgi?id=69924
   
   `HwmfHeader` used the 16-bit header type as an index into 
`HwmfHeaderMetaType.values()` without a range check, so a file that is not a 
WMF (the attached one starts with `0xF600`) failed with 
`ArrayIndexOutOfBoundsException: Index 62975 out of bounds for length 2`.
   
   It now throws `IOException("Not a valid WMF header. Type: 0xf600")` — a 
checked exception, as the reporter asked for, and the same kind `HemfHeader` 
throws for an invalid EMF header and `HwmfPicture` for an unknown record type.
   
   The attached file is added as `test-data/slideshow/bug69924.wmf` with a 
regression test in `TestHwmfParsing` and the matching entry in 
`poi-integration-exceptions.csv`.
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to