diff options
author | Caolán McNamara <caolanm@redhat.com> | 2021-03-24 09:30:18 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2021-03-24 20:41:58 +0100 |
commit | 1bc297cb63e52b5cad3580ac5a3cb274c6dfcf66 (patch) | |
tree | cbcea8c4f09047c96bb922135f626e35eb664635 | |
parent | c72a00868cd13be911798d2c508c10b6367606ab (diff) |
cid#1474363 Untrusted value as argument
and...
cid#1474164 Untrusted value as argument
cid#1474033 Untrusted value as argument
cid#1473968 Untrusted value as argument
cid#1473922 Untrusted value as argument
cid#1473817 Untrusted value as argument
Change-Id: I19d3b758767c2b0cb4369257efbe477c37f231ea
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113027
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r-- | sc/source/filter/lotus/lotimpop.cxx | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/sc/source/filter/lotus/lotimpop.cxx b/sc/source/filter/lotus/lotimpop.cxx index 78ff31f824ef..1fa5c14632e7 100644 --- a/sc/source/filter/lotus/lotimpop.cxx +++ b/sc/source/filter/lotus/lotimpop.cxx @@ -173,6 +173,12 @@ void ImportLotus::Errcell() Read( aA ); + if (!rD.ValidAddress(aA)) + { + SAL_WARN("sc.filter", "invalid address"); + return; + } + ScSetStringParam aParam; aParam.setTextInput(); rD.EnsureTable(aA.Tab()); @@ -185,6 +191,12 @@ void ImportLotus::Nacell() Read( aA ); + if (!rD.ValidAddress(aA)) + { + SAL_WARN("sc.filter", "invalid address"); + return; + } + ScSetStringParam aParam; aParam.setTextInput(); rD.EnsureTable(aA.Tab()); @@ -201,6 +213,12 @@ void ImportLotus::Labelcell() Read( cAlign ); Read( aLabel ); + if (!rD.ValidAddress(aA)) + { + SAL_WARN("sc.filter", "invalid address"); + return; + } + ScSetStringParam aParam; aParam.setTextInput(); rD.EnsureTable(aA.Tab()); @@ -215,6 +233,12 @@ void ImportLotus::Numbercell() Read( aAddr ); Read( fVal ); + if (!rD.ValidAddress(aAddr)) + { + SAL_WARN("sc.filter", "invalid address"); + return; + } + rD.EnsureTable(aAddr.Tab()); rD.SetValue(aAddr, fVal); } @@ -227,6 +251,12 @@ void ImportLotus::Smallnumcell() Read( aAddr ); Read( nVal ); + if (!rD.ValidAddress(aAddr)) + { + SAL_WARN("sc.filter", "invalid address"); + return; + } + rD.EnsureTable(aAddr.Tab()); rD.SetValue(aAddr, SnumToDouble(nVal)); } @@ -251,6 +281,12 @@ void ImportLotus::Formulacell( sal_uInt16 n ) if (!aConv.good()) return; + if (!rD.ValidAddress(aAddr)) + { + SAL_WARN("sc.filter", "invalid address"); + return; + } + ScFormulaCell* pCell = pErg ? new ScFormulaCell(rD, aAddr, std::move(pErg)) : new ScFormulaCell(rD, aAddr); pCell->AddRecalcMode( ScRecalcMode::ONLOAD_ONCE ); rD.EnsureTable(aAddr.Tab()); |