[Libreoffice-commits] core.git: sc/qa sc/source
Caolán McNamara
caolanm at redhat.com
Mon Oct 5 01:05:10 PDT 2015
sc/qa/unit/data/xls/pass/crash-7.xls |binary
sc/source/filter/excel/xilink.cxx | 6 +++++-
2 files changed, 5 insertions(+), 1 deletion(-)
New commits:
commit 75304346823ed4d5b6c7415b2f78e4022fdd8e72
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Oct 5 09:03:16 2015 +0100
fix crash in XclImpSupbook::GetExternName
Change-Id: I1b6f8d5190fae16bdeb1def7887d3121dad6bc16
diff --git a/sc/qa/unit/data/xls/pass/crash-7.xls b/sc/qa/unit/data/xls/pass/crash-7.xls
new file mode 100644
index 0000000..3dd200a
Binary files /dev/null and b/sc/qa/unit/data/xls/pass/crash-7.xls differ
diff --git a/sc/source/filter/excel/xilink.cxx b/sc/source/filter/excel/xilink.cxx
index 0f84a56..33581ce 100644
--- a/sc/source/filter/excel/xilink.cxx
+++ b/sc/source/filter/excel/xilink.cxx
@@ -703,7 +703,11 @@ void XclImpSupbook::ReadExternname( XclImpStream& rStrm, ExcelToSc* pFormulaConv
const XclImpExtName* XclImpSupbook::GetExternName( sal_uInt16 nXclIndex ) const
{
- OSL_ENSURE( nXclIndex > 0, "XclImpSupbook::GetExternName - index must be >0" );
+ if (nXclIndex == 0)
+ {
+ SAL_WARN("sc", "XclImpSupbook::GetExternName - index must be >0");
+ return NULL;
+ }
if (meType == EXC_SBTYPE_SELF || nXclIndex > maExtNameList.size())
return NULL;
return &maExtNameList[nXclIndex-1];
More information about the Libreoffice-commits
mailing list