diff options
author | Caolán McNamara <caolanm@redhat.com> | 2022-03-06 15:49:28 +0000 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2022-04-06 10:48:25 +0200 |
commit | 7b32ab1326b631a41de37c2c5f6c2af6b3a46215 (patch) | |
tree | 6fcba92543859d758881573cf7c8468733314381 | |
parent | lok-comments: CopyOneCellFromClip: notify lok clients (diff) | |
download | core-7b32ab1326b631a41de37c2c5f6c2af6b3a46215.tar.gz core-7b32ab1326b631a41de37c2c5f6c2af6b3a46215.zip |
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.cxx | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/vcl/source/outdev/hatch.cxx b/vcl/source/outdev/hatch.cxx index 33ff9e648213..4d05467aacc4 100644 --- a/vcl/source/outdev/hatch.cxx +++ b/vcl/source/outdev/hatch.cxx @@ -370,7 +370,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() ); |