sc/source/core/data/formulacell.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 00f17500520bcb2634146496adc8de9f4d28eea5
Author: Eike Rathke <er...@redhat.com>
Date:   Fri Jan 6 16:55:32 2017 +0100

    out of bounds string access
    
    Change-Id: Iecbe24f90cefe34a447cd52a44967a4b09b4394b

diff --git a/sc/source/core/data/formulacell.cxx 
b/sc/source/core/data/formulacell.cxx
index 06fc6b1..9398159 100644
--- a/sc/source/core/data/formulacell.cxx
+++ b/sc/source/core/data/formulacell.cxx
@@ -1355,7 +1355,7 @@ void ScFormulaCell::CompileXML( 
sc::CompileFormulaContext& rCxt, ScProgress& rPr
         {
             if ( !pCode->GetLen() )
             {
-                if ( aFormula[0] == '=' )
+                if ( !aFormula.isEmpty() && aFormula[0] == '=' )
                     pCode->AddBad( aFormula.copy( 1 ) );
                 else
                     pCode->AddBad( aFormula );
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to