[Libreoffice-commits] core.git: sc/qa sc/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Mon Apr 8 20:12:49 UTC 2019
sc/qa/unit/data/wks/fail/ofz14129-1.wks |binary
sc/source/filter/lotus/tool.cxx | 7 ++++---
2 files changed, 4 insertions(+), 3 deletions(-)
New commits:
commit 6e7bfc896e6cb4d91dcecf974f0d9ee41f35b86a
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Mon Apr 8 15:21:09 2019 +0100
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Mon Apr 8 22:12:27 2019 +0200
ofz#14129 assert on empty string
Change-Id: I9ef3ef21111b3b853df43b2f84bfd7e5da824682
Reviewed-on: https://gerrit.libreoffice.org/70419
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/sc/qa/unit/data/wks/fail/ofz14129-1.wks b/sc/qa/unit/data/wks/fail/ofz14129-1.wks
new file mode 100644
index 000000000000..016d87e63a86
Binary files /dev/null and b/sc/qa/unit/data/wks/fail/ofz14129-1.wks differ
diff --git a/sc/source/filter/lotus/tool.cxx b/sc/source/filter/lotus/tool.cxx
index dabbd05dcd03..2c0a0f7465e9 100644
--- a/sc/source/filter/lotus/tool.cxx
+++ b/sc/source/filter/lotus/tool.cxx
@@ -480,9 +480,10 @@ bool RangeNameBufferWK3::FindRel( const OUString& rRef, sal_uInt16& rIndex )
bool RangeNameBufferWK3::FindAbs( const OUString& rRef, sal_uInt16& rIndex )
{
- OUString aTmp( rRef );
- aTmp = aTmp.copy(1);
- StringHashEntry aRef( aTmp ); // search w/o '$'!
+ if (rRef.isEmpty())
+ return false;
+ OUString aTmp(rRef.copy(1));
+ StringHashEntry aRef(aTmp); // search w/o '$'!
std::vector<Entry>::iterator itr = std::find_if(maEntries.begin(), maEntries.end(),
[&aRef](const Entry& rEntry) { return aRef == rEntry.aStrHashEntry; });
More information about the Libreoffice-commits
mailing list