[Libreoffice-commits] core.git: sc/source

Eike Rathke erack at redhat.com
Fri Jan 6 15:56:42 UTC 2017


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

New commits:
commit 00f17500520bcb2634146496adc8de9f4d28eea5
Author: Eike Rathke <erack at 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 );


More information about the Libreoffice-commits mailing list