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 ddd5614f8c4b95c2b2e902b028060425b1bbc7dc Author: Caolán McNamara <caol...@redhat.com> Date: Mon Oct 5 09:03:16 2015 +0100 fix crash in XclImpSupbook::GetExternName Change-Id: I1b6f8d5190fae16bdeb1def7887d3121dad6bc16 (cherry picked from commit 75304346823ed4d5b6c7415b2f78e4022fdd8e72) Reviewed-on: https://gerrit.libreoffice.org/19147 Reviewed-by: Eike Rathke <er...@redhat.com> Tested-by: Eike Rathke <er...@redhat.com> 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 1232b97..fce7ba4 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];
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits