[Libreoffice-commits] core.git: 2 commits - sc/qa sc/source
Caolán McNamara
caolanm at redhat.com
Sat Oct 3 04:48:51 PDT 2015
sc/qa/unit/data/xls/pass/crash-3.xls |binary
sc/source/filter/excel/impop.cxx | 15 +++++++++++++--
2 files changed, 13 insertions(+), 2 deletions(-)
New commits:
commit c4d1a99ec667bdd661669afd72a708bd9a963db2
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sat Oct 3 11:53:48 2015 +0100
fix crash on loading certain xls
Change-Id: I4f4563b07109df7e2288458cf8adda37582262cf
diff --git a/sc/source/filter/excel/impop.cxx b/sc/source/filter/excel/impop.cxx
index 9b11b31..cc3c312 100644
--- a/sc/source/filter/excel/impop.cxx
+++ b/sc/source/filter/excel/impop.cxx
@@ -1026,17 +1026,21 @@ void ImportExcel::Array34()
aIn.Ignore( (GetBiff() >= EXC_BIFF5) ? 6 : 2 );
nFormLen = aIn.ReaduInt16();
+ const ScTokenArray* pErgebnis = nullptr;
+
if( ValidColRow( nLastCol, nLastRow ) )
{
// the read mark is now on the formula, length in nFormLen
- const ScTokenArray* pErgebnis;
pFormConv->Reset( ScAddress( static_cast<SCCOL>(nFirstCol),
static_cast<SCROW>(nFirstRow), GetCurrScTab() ) );
pFormConv->Convert( pErgebnis, maStrm, nFormLen, true, FT_CellFormula);
- OSL_ENSURE( pErgebnis, "+ImportExcel::Array34(): ScTokenArray is NULL!" );
+ SAL_WARN_IF(!pErgebnis, "sc", "+ImportExcel::Array34(): ScTokenArray is NULL!");
+ }
+ if (pErgebnis)
+ {
ScDocumentImport& rDoc = GetDocImport();
ScRange aArrayRange(nFirstCol, nFirstRow, GetCurrScTab(), nLastCol, nLastRow, GetCurrScTab());
rDoc.setMatrixCells(aArrayRange, *pErgebnis, formula::FormulaGrammar::GRAM_ENGLISH_XL_A1);
commit 4eb26f9cae2aacc8d672884283460e86e5c331ca
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sat Oct 3 11:48:14 2015 +0100
xls: Defrowheight345 without pColRowBuff
Change-Id: I22be90d7c54b1118f81337bd9e1d97ba3a1fd86e
diff --git a/sc/qa/unit/data/xls/pass/crash-3.xls b/sc/qa/unit/data/xls/pass/crash-3.xls
new file mode 100644
index 0000000..99e485a
Binary files /dev/null and b/sc/qa/unit/data/xls/pass/crash-3.xls differ
diff --git a/sc/source/filter/excel/impop.cxx b/sc/source/filter/excel/impop.cxx
index e252185..9b11b31 100644
--- a/sc/source/filter/excel/impop.cxx
+++ b/sc/source/filter/excel/impop.cxx
@@ -1048,6 +1048,13 @@ void ImportExcel::Defrowheight345()
sal_uInt16 nFlags, nDefHeight;
nFlags = maStrm.ReaduInt16();
nDefHeight = maStrm.ReaduInt16();
+
+ if (!pColRowBuff)
+ {
+ SAL_WARN("sc", "*ImportExcel::Defrowheight345(): pColRowBuff is NULL!");
+ return;
+ }
+
pColRowBuff->SetDefHeight( nDefHeight, nFlags );
}
More information about the Libreoffice-commits
mailing list