diff options
author | Caolán McNamara <caolanm@redhat.com> | 2022-03-13 11:23:07 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2022-03-13 14:51:53 +0100 |
commit | 841788923ce185c140ebeac6d34faffa348c8b6e (patch) | |
tree | a58c958132aac34bab4f5e57deb403f5d5336c4d /tools | |
parent | f7151c8ab4e4928de8f29c2b4ac232b0a7cefa74 (diff) |
ofz#45527 detect too many points earlier
Change-Id: I7716ca8b9de9312bcaabf1d16e60dbac7ae87e52
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131492
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/source/generic/poly.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/source/generic/poly.cxx b/tools/source/generic/poly.cxx index b3f53cb0e673..687cb6a5d4fb 100644 --- a/tools/source/generic/poly.cxx +++ b/tools/source/generic/poly.cxx @@ -1156,7 +1156,8 @@ static void ImplAdaptiveSubdivide( std::vector<Point>& rPoints, // stop if distance from line is guaranteed to be bounded by d if( old_d2 > d2 && recursionDepth < maxRecursionDepth && - distance2 >= d2 ) + distance2 >= d2 && + rPoints.size() < SAL_MAX_UINT16 ) { // deCasteljau bezier arc, split at t=0.5 // Foley/vanDam, p. 508 |