summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorCaolán McNamara <caolan.mcnamara@collabora.com>2024-09-01 11:29:13 +0100
committerCaolán McNamara <caolan.mcnamara@collabora.com>2024-09-01 15:33:18 +0200
commit4b3f2171cc6296b575a2b3bd5a0504d99042c5c9 (patch)
tree729eb56b2c737cc69cc3976ba00d30dc12a55043 /sc
parent5456431aff45c7080ad894f055bcd7513a93a6a6 (diff)
cid#1618766 Unchecked return value
Change-Id: I600d536db7069209ffd14fb704b1c02a3ff85121 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172712 Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> Tested-by: Jenkins
Diffstat (limited to 'sc')
-rw-r--r--sc/source/filter/xml/XMLChangeTrackingImportHelper.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/sc/source/filter/xml/XMLChangeTrackingImportHelper.cxx b/sc/source/filter/xml/XMLChangeTrackingImportHelper.cxx
index 1670570e8a05..192bc1a669e4 100644
--- a/sc/source/filter/xml/XMLChangeTrackingImportHelper.cxx
+++ b/sc/source/filter/xml/XMLChangeTrackingImportHelper.cxx
@@ -196,10 +196,10 @@ sal_uInt32 ScXMLChangeTrackingImportHelper::GetIDFromString(std::string_view sID
if (sID.substr(0, SC_CHANGE_ID_PREFIX.getLength()) == SC_CHANGE_ID_PREFIX)
{
sal_Int32 nValue;
- ::sax::Converter::convertNumber(nValue, sID.substr(SC_CHANGE_ID_PREFIX.getLength()),
- 0, SAL_MAX_INT32);
- OSL_ENSURE(nValue > 0, "wrong change action ID");
- nResult = nValue;
+ if (::sax::Converter::convertNumber(nValue, sID.substr(SC_CHANGE_ID_PREFIX.getLength()),
+ 0, SAL_MAX_INT32))
+ nResult = nValue;
+ OSL_ENSURE(nResult > 0, "wrong change action ID");
}
else
{