summaryrefslogtreecommitdiff
path: root/starmath
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2022-05-26 09:19:38 +0100
committerCaolán McNamara <caolanm@redhat.com>2022-05-26 11:09:21 +0200
commitf26926fe679d3718a61b6e5873cb2ffad0d391c3 (patch)
tree0a3116f26ae709fd552bdb85bcd3a03f48142ced /starmath
parent24c709655e5c1ca51c6c6da7ef0cb733354f6d20 (diff)
ofz#47639 avoid Integer-overflow
Change-Id: I3f89238187dfb8cfd7a929d5f5576b83f6ec37c9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134982 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'starmath')
-rw-r--r--starmath/source/mathml/mathmlattr.cxx1
1 files changed, 1 insertions, 0 deletions
diff --git a/starmath/source/mathml/mathmlattr.cxx b/starmath/source/mathml/mathmlattr.cxx
index ce28ec7836e9..5e54f0d92e3e 100644
--- a/starmath/source/mathml/mathmlattr.cxx
+++ b/starmath/source/mathml/mathmlattr.cxx
@@ -40,6 +40,7 @@ static std::size_t ParseMathMLUnsignedNumber(std::u16string_view rStr, Fraction&
if (validNomDen
&& (o3tl::checked_multiply(nom, sal_Int64(10), nom)
|| o3tl::checked_add(nom, sal_Int64(cD - u'0'), nom)
+ || nom >= std::numeric_limits<sal_Int32>::max()
|| (nDecimalPoint != std::u16string_view::npos
&& o3tl::checked_multiply(den, sal_Int64(10), den))))
{