summaryrefslogtreecommitdiff
path: root/svl
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2020-01-29 17:28:21 +0000
committerCaolán McNamara <caolanm@redhat.com>2020-01-29 21:24:53 +0100
commitd34b37ebe334fe26aa22eb6e8aa5bb5bb9b83863 (patch)
tree53cbf8fe78c116ae6e9fada41aee5e5bbe1c19a3 /svl
parentf0c2e0d27ccdeaefb00b63e7462e1c25e18f73af (diff)
cid#1458019 silence Out-of-bounds write
and cid#1458017 silence Out-of-bounds write Change-Id: I5411322bca523e5dc55b8df2e7d9261981f504da Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87703 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'svl')
-rw-r--r--svl/source/numbers/zforscan.cxx3
1 files changed, 1 insertions, 2 deletions
diff --git a/svl/source/numbers/zforscan.cxx b/svl/source/numbers/zforscan.cxx
index 1434bbf08636..3f1712ff0fb5 100644
--- a/svl/source/numbers/zforscan.cxx
+++ b/svl/source/numbers/zforscan.cxx
@@ -20,7 +20,6 @@
#include <stdlib.h>
#include <comphelper/string.hxx>
-#include <o3tl/safeint.hxx>
#include <sal/log.hxx>
#include <tools/debug.hxx>
#include <i18nlangtag/mslangid.hxx>
@@ -1635,7 +1634,7 @@ bool ImpSvNumberformatScan::InsertSymbol( sal_uInt16 & nPos, svt::NfSymbolType e
}
else
{
- if (o3tl::make_unsigned(nStringsCnt + 1) >= NF_MAX_FORMAT_SYMBOLS)
+ if (nStringsCnt >= NF_MAX_FORMAT_SYMBOLS - 1)
{
return false;
}