tools/source/generic/poly.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
New commits: commit bc7c37f2f67ace27196a46c62c2d568501e9f796 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Wed Apr 28 09:02:16 2021 +0100 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Wed Apr 28 16:17:17 2021 +0200 ofz#33769 Integer-overflow Change-Id: I067db0452650cf3e8bc887abac74c4ff796d4ad2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114768 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> diff --git a/tools/source/generic/poly.cxx b/tools/source/generic/poly.cxx index e482528b9ab1..05d35f7d1385 100644 --- a/tools/source/generic/poly.cxx +++ b/tools/source/generic/poly.cxx @@ -227,14 +227,14 @@ ImplPolygon::ImplPolygon( const Point& rCenter, tools::Long nRadX, tools::Long n ImplPolygon::ImplPolygon( const tools::Rectangle& rBound, const Point& rStart, const Point& rEnd, PolyStyle eStyle ) { - const tools::Long nWidth = rBound.GetWidth(); - const tools::Long nHeight = rBound.GetHeight(); + const auto nWidth = rBound.GetWidth(); + const auto nHeight = rBound.GetHeight(); if( ( nWidth > 1 ) && ( nHeight > 1 ) ) { const Point aCenter( rBound.Center() ); - const tools::Long nRadX = aCenter.X() - rBound.Left(); - const tools::Long nRadY = aCenter.Y() - rBound.Top(); + const auto nRadX = o3tl::saturating_sub(aCenter.X(), rBound.Left()); + const auto nRadY = o3tl::saturating_sub(aCenter.Y(), rBound.Top()); sal_uInt16 nPoints; tools::Long nRadXY; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits