[Libreoffice-commits] core.git: svl/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Wed Jan 29 20:25:30 UTC 2020
svl/source/numbers/zforscan.cxx | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
New commits:
commit d34b37ebe334fe26aa22eb6e8aa5bb5bb9b83863
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Wed Jan 29 17:28:21 2020 +0000
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Wed Jan 29 21:24:53 2020 +0100
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 at redhat.com>
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;
}
More information about the Libreoffice-commits
mailing list