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>
This commit is contained in:
parent
24c709655e
commit
f26926fe67
1 changed files with 1 additions and 0 deletions
|
@ -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))))
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue