summaryrefslogtreecommitdiff
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-11 15:52:42 +0100
commit02e0899b58f54f71f6b0c364f7ff30d1a5bd4a0f (patch)
treec630c43e5fe13a67954d6da627eaf7312730c304
parent205a73755b02ece750f85f95f7091d490facc3ee (diff)
ofz: Too many hatch points
Change-Id: I08cb9d09a9bb48ab31763f50bc2fa23cf723330f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131014 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> (cherry picked from commit bee0950a4c5bd996a8df0185b03c0f98e7a3de9c) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131370 Tested-by: Michael Stahl <michael.stahl@allotropia.de>
-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 2059aa364824..f65b28ae5c24 100644
--- a/vcl/source/outdev/hatch.cxx
+++ b/vcl/source/outdev/hatch.cxx
@@ -373,7 +373,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() );