sc/qa/unit/data/xls/pass/ooo47086-1.xls |binary
 sc/source/core/tool/compiler.cxx        |    2 +-
 2 files changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 85f141b533b9b778971ddf755d93df09f92d495d
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Sat Aug 11 20:27:09 2018 +0100
Commit:     Caolán McNamara <caol...@redhat.com>
CommitDate: Mon Aug 13 09:44:57 2018 +0200

    crashtesting: load of ooo47086-1.xls
    
    presumably since...
    
    commit df1d4bd528027c60bcab2f2e0a87303610fad326
    Date:   Sat Aug 4 20:10:55 2018 +0200
    
        ScCompiler::IsString, pass down the string length if we know it
    
    reading the old code, it looks it would have returned true
    for this case of input of a bare " but change this to return false
    as that doesn't seem quite right for this case
    
    Change-Id: Id54ffe6440bb842d8103174edd6b99940ca5d142
    Reviewed-on: https://gerrit.libreoffice.org/58889
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>
    Reviewed-by: Caolán McNamara <caol...@redhat.com>
    Tested-by: Caolán McNamara <caol...@redhat.com>

diff --git a/sc/qa/unit/data/xls/pass/ooo47086-1.xls 
b/sc/qa/unit/data/xls/pass/ooo47086-1.xls
new file mode 100644
index 000000000000..eb5b0a628482
Binary files /dev/null and b/sc/qa/unit/data/xls/pass/ooo47086-1.xls differ
diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx
index d0849f8e1bf7..39a70965e205 100644
--- a/sc/source/core/tool/compiler.cxx
+++ b/sc/source/core/tool/compiler.cxx
@@ -3002,7 +3002,7 @@ bool ScCompiler::IsString()
     while ( *p )
         p++;
     sal_Int32 nLen = sal::static_int_cast<sal_Int32>( p - cSymbol - 1 );
-    if (cSymbol[nLen] != '"')
+    if (!nLen || cSymbol[nLen] != '"')
         return false;
     svl::SharedString aSS = 
pDoc->GetSharedStringPool().intern(OUString(cSymbol+1, nLen-1));
     maRawToken.SetString(aSS.getData(), aSS.getDataIgnoreCase());
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to