diff options
author | Caolán McNamara <caolanm@redhat.com> | 2021-06-27 19:08:36 +0100 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2021-11-24 14:56:33 +0100 |
commit | 380e289dbbdbf91bf479817bad1b8ec53bc28bc9 (patch) | |
tree | bd8208278c98823cca963a0ebd02951940758ce9 /tools | |
parent | 806ab3d846208425856af0a40b6873d00992739f (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>
(cherry picked from commit 228cb26a6a1afe668dd17471bedf0ab52f133d5a)
Diffstat (limited to 'tools')
-rw-r--r-- | tools/source/generic/poly.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/source/generic/poly.cxx b/tools/source/generic/poly.cxx index 0a597fdff1fc..b549f1cd65c1 100644 --- a/tools/source/generic/poly.cxx +++ b/tools/source/generic/poly.cxx @@ -251,7 +251,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 |