summaryrefslogtreecommitdiff
path: root/formula/source
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2015-03-30 21:29:46 +0200
committerEike Rathke <erack@redhat.com>2015-03-30 21:33:56 +0200
commiteed393039a9067f7a1a318934ff1c5ff90bfe443 (patch)
tree55304f1b58ab54ba27dea6fb7dd3d50f05443078 /formula/source
parent836d05d32e36aafc00de59ca51878f47f7ce816a (diff)
Resolves: tdf#90301 string access out of bounds
Apparently yet another leftover of UniString to OUString conversion where with UniString out-of-bounds accesses didn't harm and returned NIL. Change-Id: Id88456a52df3fc8cdaf90d9d509e327b96269808
Diffstat (limited to 'formula/source')
-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 73ef78243498..fe78f3a59f6f 100644
--- a/formula/source/ui/dlg/FormulaHelper.cxx
+++ b/formula/source/ui/dlg/FormulaHelper.cxx
@@ -201,7 +201,7 @@ sal_Int32 FormulaHelper::GetFunctionStart( const OUString& rFormula,
return nStart;
sal_Int32 nFStart = FUNC_NOTFOUND;
- sal_Int32 nParPos = nStart;
+ sal_Int32 nParPos = bBack ? ::std::min( nStart, nStrLen - 1) : nStart;
bool bRepeat;
do