vcl/source/outdev/line.cxx | 29 +++++++++++++---------------- 1 file changed, 13 insertions(+), 16 deletions(-)
New commits: commit 5fdd00dc26123850858564b079154765a01c83bf Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Sun Mar 12 20:52:59 2023 +0000 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Mon Mar 13 08:46:28 2023 +0000 ofz#56910 Timeout Change-Id: Ic820a984d9a714babe590c51fbb4120f12c14089 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148740 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> diff --git a/vcl/source/outdev/line.cxx b/vcl/source/outdev/line.cxx index 92545a69d8d8..f641c338fdfa 100644 --- a/vcl/source/outdev/line.cxx +++ b/vcl/source/outdev/line.cxx @@ -330,7 +330,19 @@ void OutputDevice::drawLine( basegfx::B2DPolyPolygon aLinePolyPolygon, const Lin bool bDone(false); - if(bTryB2d) + if (bFuzzing) + { + const basegfx::B2DRange aRange(basegfx::utils::getRange(aFillPolyPolygon)); + if (aRange.getMaxX() - aRange.getMinX() > 0x10000000 + || aRange.getMaxY() - aRange.getMinY() > 0x10000000) + { + SAL_WARN("vcl.gdi", "drawLine, skipping suspicious range of: " + << aRange << " for fuzzing performance"); + bDone = true; + } + } + + if (bTryB2d && !bDone) { bDone = mpGraphics->DrawPolyPolygon( basegfx::B2DHomMatrix(), @@ -339,21 +351,6 @@ void OutputDevice::drawLine( basegfx::B2DPolyPolygon aLinePolyPolygon, const Lin *this); } - if(!bDone) - { - if (bFuzzing) - { - const basegfx::B2DRange aRange(basegfx::utils::getRange(aFillPolyPolygon)); - if (aRange.getMaxX() - aRange.getMinX() > 0x10000000 - || aRange.getMaxY() - aRange.getMinY() > 0x10000000) - { - SAL_WARN("vcl.gdi", "drawLine, skipping suspicious range of: " - << aRange << " for fuzzing performance"); - bDone = true; - } - } - } - if(!bDone) { for(auto const& rB2DPolygon : std::as_const(aFillPolyPolygon))