diff options
author | Caolán McNamara <caolanm@redhat.com> | 2019-10-31 12:25:05 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2019-10-31 17:30:55 +0100 |
commit | 20bca05a8e5a07c21451e4c62064d1a5680611d9 (patch) | |
tree | 5e385e3a664ba7fe2a9daf9dcbd0de210127e160 | |
parent | 36022becbe25c412460411ab50ecaf7740933dca (diff) |
crashtesting: null deref on import of fdo48634-1.xls
Change-Id: If718c39d31ae214f02cbb747f0ceafd35b297521
Reviewed-on: https://gerrit.libreoffice.org/81843
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r-- | sc/source/filter/excel/xicontent.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sc/source/filter/excel/xicontent.cxx b/sc/source/filter/excel/xicontent.cxx index 3baf8a5d4292..298f612f2b1c 100644 --- a/sc/source/filter/excel/xicontent.cxx +++ b/sc/source/filter/excel/xicontent.cxx @@ -337,8 +337,9 @@ OUString XclImpHyperlink::ReadEmbeddedData( XclImpStream& rStrm ) // '#SheetName.A1' if possible. if (nSepPos < xTextMark->getLength() - 1) { + ScDocument& rDoc = rRoot.GetDoc(); ScRange aRange; - if ((aRange.ParseAny( xTextMark->copy( nSepPos + 1 ), nullptr, formula::FormulaGrammar::CONV_XL_R1C1) + if ((aRange.ParseAny( xTextMark->copy( nSepPos + 1 ), &rDoc, formula::FormulaGrammar::CONV_XL_R1C1) & ScRefFlags::VALID) == ScRefFlags::ZERO) xTextMark.reset( new OUString( xTextMark->replaceAt( nSepPos, 1, OUString( '.' )))); } |