Bug 10735

Summary: [PATCH] Fixes to FormulaParser to keep it from getting index out of bounds on formulaString
Product: POI Reporter: Eric Ladner <eladner>
Component: HSSFAssignee: POI Developers List <dev>
Status: RESOLVED FIXED    
Severity: major    
Priority: P3    
Version: 2.0-dev   
Target Milestone: ---   
Hardware: All   
OS: other   
Attachments: FormulaParser fixes for getChar

Description Eric Ladner 2002-07-12 12:59:52 UTC
Under some conditions, the parser will attempt to step off the end of the string
and get an index out of bounds.  This just adds a check to getChar that won't
allow getCharAt to return something for a pointer that's byond the end of the
string.

Also uncommented Multiply and Divide in Expression.  They seem to work correctly.
Comment 1 Eric Ladner 2002-07-12 13:00:57 UTC
Created attachment 2327 [details]
FormulaParser fixes for getChar
Comment 2 Andy Oliver 2002-07-15 02:06:52 UTC
Thank you kindly for this patch.  In the future please don't forget to add
yourself to the "@author" tags.  We like to share credit!  :-)

As just a humbe suggestion, it might be useful to create a unit test (new method
off of src/testcases/org/apache/poi/hssf/model/TestFormulaParser) that
demontrates teh bug so that it doesn't break again later.

applied, please crosscheck.