Bug 48038 - Reading StyleSheet from offset != 0 reads from arbitrary locations in the stream
Summary: Reading StyleSheet from offset != 0 reads from arbitrary locations in the stream
Status: RESOLVED FIXED
Alias: None
Product: POI
Classification: Unclassified
Component: HWPF (show other bugs)
Version: 3.5-FINAL
Hardware: PC Windows NT
: P2 major (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-10-21 16:39 UTC by Trejkaz (pen name)
Modified: 2009-11-03 16:08 UTC (History)
0 users



Attachments
Proposed patch (1.79 KB, patch)
2009-10-21 17:41 UTC, Trejkaz (pen name)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.