Bug 10735 - [PATCH] Fixes to FormulaParser to keep it from getting index out of bounds on formulaString
Summary: [PATCH] Fixes to FormulaParser to keep it from getting index out of bounds on...
Alias: None
Product: POI
Classification: Unclassified
Component: HSSF (show other bugs)
Version: 2.0-dev
Hardware: All other
: P3 major (vote)
Target Milestone: ---
Assignee: POI Developers List
Depends on:
Reported: 2002-07-12 12:59 UTC by Eric Ladner
Modified: 2004-11-16 19:05 UTC (History)
0 users

FormulaParser fixes for getChar (1.64 KB, patch)
2002-07-12 13:00 UTC, Eric Ladner
Details | Diff

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

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.