<changes>
<release version="3.7-beta3" date="2010-??-??">
+ <action dev="poi-developers" type="fix">47271 - Avoid infinite loops on broken HWPF documents with a corrupt CHP style with a parent of itself</action>
<action dev="poi-developers" type="fix">49936 - Handle HWPF documents with problematic HeaderStories better</action>
<action dev="poi-developers" type="fix">49933 - Support sections in Word 6 and Word 95 files (HWPFOldDocument)</action>
<action dev="poi-developers" type="fix">49941 - Correctly handle space preservation of XSSFRichTextRuns when applying fonts to parts of the string</action>
CharacterProperties chp = sd.getCHP();
byte[] chpx = sd.getCHPX();
int baseIndex = sd.getBaseStyle();
+
+ if(baseIndex == istd) {
+ // Oh dear, this isn't allowed...
+ // The word file seems to be corrupted
+ // Switch to using the nil style so that
+ // there's a chance we can read it
+ baseIndex = NIL_STYLE;
+ }
+
+ // Build and decompress the Chp if required
if(chp == null && chpx != null)
{
CharacterProperties parentCHP = new CharacterProperties();