summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-08-11 20:27:09 +0100
committerCaolán McNamara <caolanm@redhat.com>2018-08-13 09:44:57 +0200
commit85f141b533b9b778971ddf755d93df09f92d495d (patch)
tree21c43ad6c79bae87350bb76b328ad7fa066c1baf /sc
parent0cd46eedd08bfbb4061b3c7df66390c5e0243911 (diff)
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.grandin@collabora.co.uk> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sc')
-rw-r--r--sc/qa/unit/data/xls/pass/ooo47086-1.xlsbin0 -> 55296 bytes
-rw-r--r--sc/source/core/tool/compiler.cxx2
2 files changed, 1 insertions, 1 deletions
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
--- /dev/null
+++ b/sc/qa/unit/data/xls/pass/ooo47086-1.xls
Binary files 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());