summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2021-06-27 19:08:36 +0100
committerAndras Timar <andras.timar@collabora.com>2021-12-21 11:29:30 +0100
commit820d89395fc2abbad59035dbe406f60f52208f86 (patch)
tree88fcfc2bb1ea87b26657608e236e35b0f8bde4dd /tools
parentcd5dff9227701ab0085d32166f9e510bc8bddc16 (diff)
ofz#35504 Integer-overflow
Change-Id: I7a462b821f286411d759b5259461fcdbf1741859 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117955 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/source/generic/poly.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/source/generic/poly.cxx b/tools/source/generic/poly.cxx
index 8b4727782350..f5d57435a60a 100644
--- a/tools/source/generic/poly.cxx
+++ b/tools/source/generic/poly.cxx
@@ -255,7 +255,7 @@ ImplPolygon::ImplPolygon( const tools::Rectangle& rBound, const Point& rStart, c
}
- if( ( nRadX > 32 ) && ( nRadY > 32 ) && ( nRadX + nRadY ) < 8192 )
+ if (nRadX > 32 && nRadY > 32 && o3tl::saturating_add(nRadX, nRadY) < 8192)
nPoints >>= 1;
// compute threshold