[Libreoffice-commits] core.git: Branch 'libreoffice-4-4' - formula/source
Eike Rathke
erack at redhat.com
Wed Apr 29 21:09:23 PDT 2015
formula/source/ui/dlg/FormulaHelper.cxx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit 121a2c44c90004300b41bee1492c614dc0fe57aa
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
(cherry picked from commit d6635af3186314de0c20a904b36e50bba4ae63cd)
Reviewed-on: https://gerrit.libreoffice.org/15570
Tested-by: Markus Mohrhard <markus.mohrhard at googlemail.com>
Reviewed-by: Markus Mohrhard <markus.mohrhard at googlemail.com>
diff --git a/formula/source/ui/dlg/FormulaHelper.cxx b/formula/source/ui/dlg/FormulaHelper.cxx
index 9d9bda1..c644856 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