starmath/source/mathml/mathmlattr.cxx |    1 +
 1 file changed, 1 insertion(+)

New commits:
commit f26926fe679d3718a61b6e5873cb2ffad0d391c3
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Thu May 26 09:19:38 2022 +0100
Commit:     Caolán McNamara <caol...@redhat.com>
CommitDate: Thu May 26 11:09:21 2022 +0200

    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 <caol...@redhat.com>

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))))
         {

Reply via email to