vcl/source/outdev/hatch.cxx | 7 +++++++ 1 file changed, 7 insertions(+)
New commits: commit bee0950a4c5bd996a8df0185b03c0f98e7a3de9c Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Sun Mar 6 15:49:28 2022 +0000 Commit: Michael Stahl <michael.st...@allotropia.de> CommitDate: Mon Mar 7 12:16:05 2022 +0100 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.st...@allotropia.de> diff --git a/vcl/source/outdev/hatch.cxx b/vcl/source/outdev/hatch.cxx index 8b62fcf10375..d261765d1c91 100644 --- a/vcl/source/outdev/hatch.cxx +++ b/vcl/source/outdev/hatch.cxx @@ -374,7 +374,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() );