summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2021-03-29 10:27:49 +0100
committerCaolán McNamara <caolanm@redhat.com>2021-03-29 13:31:38 +0200
commita22357213807fa46b903e7d040809cff194c39af (patch)
treecbff785316745ebf442b73af2108a26f6a12ebcc /sc
parent21508828c5f54559ea180d2a465a8866cd765a4d (diff)
cid#1473817 Untrusted value as argument
etc. Change-Id: Ie815b51b9c1d85a5c96adc3707b740b84f6a1096 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113301 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sc')
-rw-r--r--sc/source/filter/lotus/lotimpop.cxx6
-rw-r--r--sc/source/filter/lotus/op.cxx4
2 files changed, 10 insertions, 0 deletions
diff --git a/sc/source/filter/lotus/lotimpop.cxx b/sc/source/filter/lotus/lotimpop.cxx
index 1fa5c14632e7..cb74275221ca 100644
--- a/sc/source/filter/lotus/lotimpop.cxx
+++ b/sc/source/filter/lotus/lotimpop.cxx
@@ -182,6 +182,7 @@ void ImportLotus::Errcell()
ScSetStringParam aParam;
aParam.setTextInput();
rD.EnsureTable(aA.Tab());
+ // coverity[tainted_data : FALSE] - ValidAddress has sanitized aA
rD.SetString(aA, "#ERR!", &aParam);
}
@@ -200,6 +201,7 @@ void ImportLotus::Nacell()
ScSetStringParam aParam;
aParam.setTextInput();
rD.EnsureTable(aA.Tab());
+ // coverity[tainted_data : FALSE] - ValidAddress has sanitized aA
rD.SetString(aA, "#NA!", &aParam);
}
@@ -222,6 +224,7 @@ void ImportLotus::Labelcell()
ScSetStringParam aParam;
aParam.setTextInput();
rD.EnsureTable(aA.Tab());
+ // coverity[tainted_data : FALSE] - ValidAddress has sanitized aA
rD.SetString(aA, aLabel, &aParam);
}
@@ -240,6 +243,7 @@ void ImportLotus::Numbercell()
}
rD.EnsureTable(aAddr.Tab());
+ // coverity[tainted_data : FALSE] - ValidAddress has sanitized aAddr
rD.SetValue(aAddr, fVal);
}
@@ -258,6 +262,7 @@ void ImportLotus::Smallnumcell()
}
rD.EnsureTable(aAddr.Tab());
+ // coverity[tainted_data : FALSE] - ValidAddress has sanitized aAddr
rD.SetValue(aAddr, SnumToDouble(nVal));
}
@@ -290,6 +295,7 @@ void ImportLotus::Formulacell( sal_uInt16 n )
ScFormulaCell* pCell = pErg ? new ScFormulaCell(rD, aAddr, std::move(pErg)) : new ScFormulaCell(rD, aAddr);
pCell->AddRecalcMode( ScRecalcMode::ONLOAD_ONCE );
rD.EnsureTable(aAddr.Tab());
+ // coverity[tainted_data : FALSE] - ValidAddress has sanitized aAddr
rD.SetFormulaCell(aAddr, pCell);
}
diff --git a/sc/source/filter/lotus/op.cxx b/sc/source/filter/lotus/op.cxx
index e8be41505c25..c886ace340f1 100644
--- a/sc/source/filter/lotus/op.cxx
+++ b/sc/source/filter/lotus/op.cxx
@@ -77,6 +77,7 @@ void OP_Integer(LotusContext& rContext, SvStream& r, sal_uInt16 /*n*/)
if (rContext.rDoc.ValidAddress(aAddr))
{
rContext.rDoc.EnsureTable(0);
+ // coverity[tainted_data : FALSE] - ValidAddress has sanitized aAddr
rContext.rDoc.SetValue(aAddr, static_cast<double>(nValue));
// 0 digits in fractional part!
@@ -98,6 +99,7 @@ void OP_Number(LotusContext& rContext, SvStream& r, sal_uInt16 /*n*/)
{
fValue = ::rtl::math::round( fValue, 15 );
rContext.rDoc.EnsureTable(0);
+ // coverity[tainted_data : FALSE] - ValidAddress has sanitized aAddr
rContext.rDoc.SetValue(aAddr, fValue);
SetFormat(rContext, nCol, nRow, 0, nFormat, nFractionalFloat);
@@ -386,6 +388,7 @@ void OP_Number123(LotusContext& rContext, SvStream& r, sal_uInt16 /*n*/)
{
double fValue = Snum32ToDouble( nValue );
rContext.rDoc.EnsureTable(nTab);
+ // coverity[tainted_data : FALSE] - ValidAddress has sanitized aAddr
rContext.rDoc.SetValue(aAddr, fValue);
}
}
@@ -434,6 +437,7 @@ void OP_IEEENumber123(LotusContext& rContext, SvStream& r, sal_uInt16 /*n*/)
if (rContext.rDoc.ValidAddress(aAddr) && nTab <= rContext.rDoc.GetMaxTableNumber())
{
rContext.rDoc.EnsureTable(nTab);
+ // coverity[tainted_data : FALSE] - ValidAddress has sanitized aAddr
rContext.rDoc.SetValue(aAddr, dValue);
}
}