summaryrefslogtreecommitdiff
path: root/formula/source/ui
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2015-04-29 18:57:16 +0200
committerEike Rathke <erack@redhat.com>2015-04-29 19:00:04 +0200
commitd6635af3186314de0c20a904b36e50bba4ae63cd (patch)
tree2cfd49fc1a5552600db2cf1e0b58b63220462538 /formula/source/ui
parent969dab55bb32b4b4137d89a91050f6eaeb1715b0 (diff)
string access out of bounds
This convoluted logic may pass FUNC_NOTFOUND -1 as position around if there was no initial function. Change-Id: I217fc745d8e0b8e532642d0f69110371d183610d
Diffstat (limited to 'formula/source/ui')
-rw-r--r--formula/source/ui/dlg/FormulaHelper.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/formula/source/ui/dlg/FormulaHelper.cxx b/formula/source/ui/dlg/FormulaHelper.cxx
index 578842f3bba1..dc15145b40a1 100644
--- a/formula/source/ui/dlg/FormulaHelper.cxx
+++ b/formula/source/ui/dlg/FormulaHelper.cxx
@@ -229,7 +229,7 @@ sal_Int32 FormulaHelper::GetFunctionStart( const OUString& rFormula,
}
else
{
- while ( !bFound && (nParPos < nStrLen) )
+ while ( !bFound && (0 <= nParPos && nParPos < nStrLen) )
{
if ( rFormula[nParPos] == '"' )
{