[Libreoffice-commits] core.git: formula/source
Eike Rathke
erack at redhat.com
Wed Apr 29 10:01:01 PDT 2015
formula/source/ui/dlg/FormulaHelper.cxx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit d6635af3186314de0c20a904b36e50bba4ae63cd
Author: Eike Rathke <erack at redhat.com>
Date: Wed Apr 29 18:57:16 2015 +0200
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
diff --git a/formula/source/ui/dlg/FormulaHelper.cxx b/formula/source/ui/dlg/FormulaHelper.cxx
index 578842f3..dc15145 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] == '"' )
{
More information about the Libreoffice-commits
mailing list