diff options
author | Caolán McNamara <caolanm@redhat.com> | 2023-03-12 20:52:59 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2023-03-13 08:46:28 +0000 |
commit | 5fdd00dc26123850858564b079154765a01c83bf (patch) | |
tree | fe8322f2c2ead5ac7cae5cd5668ded99288b948a /vcl/source/outdev/line.cxx | |
parent | 143c48f3c3dd172c635e4535a0b0da741721f375 (diff) |
ofz#56910 Timeout
Change-Id: Ic820a984d9a714babe590c51fbb4120f12c14089
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148740
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl/source/outdev/line.cxx')
-rw-r--r-- | vcl/source/outdev/line.cxx | 29 |
1 files changed, 13 insertions, 16 deletions
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(), @@ -341,21 +353,6 @@ void OutputDevice::drawLine( basegfx::B2DPolyPolygon aLinePolyPolygon, const Lin 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)) { tools::Polygon aPolygon(rB2DPolygon); |