Bug 34435

Summary: Bug in org.apache.poi.ddf.EscherSpRecord
Product: POI Reporter: Nick Burch <apache>
Component: POI OverallAssignee: POI Developers List <dev>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P2    
Version: 3.0-dev   
Target Milestone: ---   
Hardware: Other   
OS: other   

Description Nick Burch 2005-04-13 13:34:26 UTC
In the decodeFlags(int) method of org.apache.poi.ddf.EscherSpRecord, it doesn't
check to see that the stringbuffer has some contents before deleting the first
character

Line 157 needs to go from:
        result.deleteCharAt(0);
To:
        if(result.length() > 0) {
            result.deleteCharAt(0);
        }

Otherwise it blows up with a StringIndexOutOfBoundsException on some records
Comment 1 Avik Sengupta 2005-04-22 13:16:56 UTC
Comitted. Thanks!