summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2019-07-17 20:34:35 +0100
committerCaolán McNamara <caolanm@redhat.com>2019-07-18 09:38:00 +0200
commit784f93b3895fc7e85eec26c3fece12433b3a5ce4 (patch)
treec410c08b6468e7e46f1dbcf47d5a1b474dd314d5
parent7fcb5c20310d23a4ede8b0a6e03ba23482792621 (diff)
cid#1448252 Negative array index read
Change-Id: Ia81e2a58e372455531479c98d11a88cd950441df Reviewed-on: https://gerrit.libreoffice.org/75808 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--sfx2/source/doc/SfxRedactionHelper.cxx4
1 files changed, 1 insertions, 3 deletions
diff --git a/sfx2/source/doc/SfxRedactionHelper.cxx b/sfx2/source/doc/SfxRedactionHelper.cxx
index 310c0374ca35..ff81bdf39292 100644
--- a/sfx2/source/doc/SfxRedactionHelper.cxx
+++ b/sfx2/source/doc/SfxRedactionHelper.cxx
@@ -546,9 +546,7 @@ void SfxRedactionHelper::fillSearchOptions(i18nutil::SearchOptions2& rSearchOpt,
rSearchOpt.Locale = GetAppLanguageTag().getLocale();
if (pTarget->sType == RedactionTargetType::REDACTION_TARGET_PREDEFINED)
{
- sal_Int32 nPredefIndex = pTarget->sContent.getToken(0, ';').toInt32();
- //sal_Int32 nPredefIndex = sContent.toInt32();
-
+ auto nPredefIndex = pTarget->sContent.getToken(0, ';').toUInt32();
rSearchOpt.searchString = m_aPredefinedTargets[nPredefIndex];
}
else