tools/source/generic/poly.cxx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
New commits: commit 550e50c529f8be00320cfd7ab1c305d9e6912dea Author: Caolán McNamara <caolan.mcnam...@collabora.com> AuthorDate: Mon May 27 20:42:10 2024 +0100 Commit: Caolán McNamara <caolan.mcnam...@collabora.com> CommitDate: Tue May 28 13:10:34 2024 +0200 ofz#69290 Integer-overflow Change-Id: I20b49bf5e3a507979332cd854205f290a3b3971c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168118 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com> Tested-by: Caolán McNamara <caolan.mcnam...@collabora.com> diff --git a/tools/source/generic/poly.cxx b/tools/source/generic/poly.cxx index 81419f7e70c3..b6b00bc2ca34 100644 --- a/tools/source/generic/poly.cxx +++ b/tools/source/generic/poly.cxx @@ -179,8 +179,7 @@ ImplPolygon::ImplPolygon( const Point& rCenter, tools::Long nRadX, tools::Long n if (!bOverflow) { nPoints = std::clamp( - ( M_PI * ( 1.5 * ( nRadX + nRadY ) - - sqrt( static_cast<double>(std::abs(nRadXY)) ) ) ), + ( M_PI * ( 1.5 * ( nRadX + nRadY ) - sqrt( std::fabs(nRadXY) ) ) ), 32.0, 256.0 ); } else @@ -245,8 +244,7 @@ ImplPolygon::ImplPolygon(const tools::Rectangle& rBound, const Point& rStart, co if (!bOverflow) { nPoints = std::clamp( - ( M_PI * ( 1.5 * ( nRadX + nRadY ) - - sqrt( static_cast<double>(std::abs(nRadXY)) ) ) ), + ( M_PI * ( 1.5 * ( nRadX + nRadY ) - sqrt( std::fabs(nRadXY) ) ) ), 32.0, 256.0 ); } else