Bug 48038

Summary: Reading StyleSheet from offset != 0 reads from arbitrary locations in the stream
Product: POI Reporter: Trejkaz (pen name) <trejkaz>
Component: HWPFAssignee: POI Developers List <dev>
Severity: major    
Priority: P2    
Version: 3.5-FINAL   
Target Milestone: ---   
Hardware: PC   
OS: Windows NT   
Attachments: Proposed patch

Description Trejkaz (pen name) 2009-10-21 16:39:38 UTC
This one has been around at least as far back as 3.0.1 (which is the first copy of POI we have in our own vendor tree.)

For some reason a lot of documents still work even though this bug exists, so the offset must be 0 fairly often.  Even so, this causes some nasty random errors.

I added a unit test which exhibits the issue.  My own complete testing will follow.
Comment 1 Trejkaz (pen name) 2009-10-21 17:41:37 UTC
Created attachment 24405 [details]
Proposed patch

Confirming that this works on our existing test data, in addition to fixing three files encountered so far.
Comment 2 Nick Burch 2009-11-03 16:08:23 UTC
Thanks for this, applied to svn trunk in r832625.