Bug 34435 - Bug in org.apache.poi.ddf.EscherSpRecord
Summary: Bug in org.apache.poi.ddf.EscherSpRecord
Status: RESOLVED FIXED
Alias: None
Product: POI
Classification: Unclassified
Component: POI Overall (show other bugs)
Version: 3.0-dev
Hardware: Other other
: P2 normal (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-04-13 13:34 UTC by Nick Burch
Modified: 2005-04-22 05:16 UTC (History)
0 users



Attachments

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