formula/source/ui/dlg/FormulaHelper.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
New commits: commit 121a2c44c90004300b41bee1492c614dc0fe57aa Author: Eike Rathke <er...@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.mohrh...@googlemail.com> Reviewed-by: Markus Mohrhard <markus.mohrh...@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] == '"' ) { _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits