summaryrefslogtreecommitdiff
path: root/vcl/source
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2022-03-06 15:49:28 +0000
committerMichael Stahl <michael.stahl@allotropia.de>2022-03-07 12:15:38 +0100
commit3423ebf903f17107edeea43062a77e03f31e387d (patch)
tree0a52be31ccc6579ff281ba919fd0ae18c9192eb1 /vcl/source
parentbc8bfb709c015e34a7c9c8f3239b075562da208f (diff)
ofz: Too many hatch points
Change-Id: I08cb9d09a9bb48ab31763f50bc2fa23cf723330f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131013 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Diffstat (limited to 'vcl/source')
-rw-r--r--vcl/source/outdev/hatch.cxx7
1 files changed, 7 insertions, 0 deletions
diff --git a/vcl/source/outdev/hatch.cxx b/vcl/source/outdev/hatch.cxx
index 160aa904ffd6..b3cd1dd6ebf8 100644
--- a/vcl/source/outdev/hatch.cxx
+++ b/vcl/source/outdev/hatch.cxx
@@ -353,7 +353,14 @@ void OutputDevice::DrawHatchLine( const tools::Line& rLine, const tools::PolyPol
nAdd = 1;
if( nAdd )
+ {
+ if (nPCounter == HATCH_MAXPOINTS)
+ {
+ SAL_WARN("vcl.gdi", "too many hatch points");
+ return;
+ }
pPtBuffer[ nPCounter++ ] = Point( FRound( fX ), FRound( fY ) );
+ }
}
aCurSegment.SetStart( aCurSegment.GetEnd() );