summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2021-06-03 11:10:23 +0100
committerCaolán McNamara <caolanm@redhat.com>2021-06-03 13:37:36 +0200
commit71fe0aeee20640c57816dc45010d32dac9afeaaf (patch)
tree334fcc6e9db3671e9eb72988e31f7df7ae48e93e /tools
parent4d2a8d50ecb2fdf282bbaf3b5f3509e72ca604fc (diff)
ofz#33769 Integer-overflow
Change-Id: I2f158b1f7c3fdaea00c4334cf3889e0f38674e8a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116650 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 f0a0a7388b06..857a1a8e7cbb 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