[Libreoffice-commits] core.git: sc/source
Eike Rathke
erack at redhat.com
Fri Jul 14 12:35:36 UTC 2017
sc/source/core/tool/address.cxx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit 62ee21cb463d80a28c4c41a488f85e07abafbc69
Author: Eike Rathke <erack at redhat.com>
Date: Fri Jul 14 14:34:28 2017 +0200
Fix export test crash of ooo95715-1.xls
Negative sheet number injected by
sc::FormulaLogger::GroupScope::addRefMessage() wans't handled by lcl_Format()
#9 0x00007f292172c322 in ScGroupTokenConverter::convert (this=0x7ffc5b1940d0, rCode=..., rScope=...)
at /build/libo/dev/sc/source/core/data/grouptokenconverter.cxx:140
#8 0x00007f29224c54d8 in sc::FormulaLogger::GroupScope::addRefMessage (this=0x7ffc5b193ff0, rCellPos=...,
rRefPos=..., nLen=111, rArray=...) at /build/libo/dev/sc/source/core/tool/formulalogger.cxx:147
#7 0x00007f292181c071 in ScRange::Format (this=0x7ffc5b193dc0, nFlags=-32760, pDoc=0x4b1db70, rDetails=...,
bFullAddressNotation=false) at /build/libo/dev/sc/source/core/tool/address.cxx:2211
#6 0x00007f292181b9a9 in ScAddress::Format (this=0x7ffc5b193dc0, nFlags=-32760, pDoc=0x4b1db70, rDetails=...)
at /build/libo/dev/sc/source/core/tool/address.cxx:2111
#5 0x00007f292181ecf5 in lcl_Format<rtl::OUStringBuffer> (r="", nTab=-1, nRow=75, nCol=0, nFlags=-30968,
pDoc=0x4b1db70, rDetails=...) at /build/libo/dev/sc/source/core/tool/address.cxx:2018
#4 0x00007f29214471fb in rtl::OUString::operator[] (this=0x7ffc5b193c00, index=0)
at /build/libo/dev/include/rtl/ustring.hxx:668
Change-Id: I68ecfb11574644e9e5670431789ee42d37d27523
diff --git a/sc/source/core/tool/address.cxx b/sc/source/core/tool/address.cxx
index de79a3d8a4df..f9b721159484 100644
--- a/sc/source/core/tool/address.cxx
+++ b/sc/source/core/tool/address.cxx
@@ -2005,7 +2005,7 @@ template<typename T > inline void lcl_Format( T& r, SCTAB nTab, SCROW nRow, SCCO
nFlags |= ( ScRefFlags::ROW_VALID | ScRefFlags::COL_VALID | ScRefFlags::TAB_VALID );
if( pDoc && (nFlags & ScRefFlags::TAB_VALID ) )
{
- if ( nTab >= pDoc->GetTableCount() )
+ if ( nTab < 0 || nTab >= pDoc->GetTableCount() )
{
lcl_string_append(r, ScGlobal::GetRscString( STR_NOREF_STR ));
return;
More information about the Libreoffice-commits
mailing list