diff options
author | Caolán McNamara <caolan.mcnamara@collabora.com> | 2024-07-01 11:43:51 +0100 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2024-07-03 15:53:32 +0200 |
commit | a4cdd8f9581d5f61e122039b9388d83609d4ecef (patch) | |
tree | ecc61e5ff530a6e5b64d1d81842266d5fec99d76 /drawinglayer | |
parent | d160ac57a90b5944505be11e04c31937d83c7dfd (diff) |
crashtesting: divide by zero
since:
commit 7b807a6b793198c00db9b2c2c3a5eb3ebfe16ad9
Date: Fri Jun 21 12:28:30 2024 +0200
tdf#161086 bitmap location wrong with SVG with an embedded PNG
bodge it by using the requested width/height and not the possibly
zero on fail actual sizes
Change-Id: Ic55ba6ce3cc14fa598299cdd1f844ee7c63fb174
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169800
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins
(cherry picked from commit af2175bb87b8e8a7184916e110e2b22ec542357d)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169815
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'drawinglayer')
-rw-r--r-- | drawinglayer/source/processor2d/vclpixelprocessor2d.cxx | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx b/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx index 734ad392b161..8d199f696a40 100644 --- a/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx +++ b/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx @@ -1092,8 +1092,7 @@ void VclPixelProcessor2D::processPatternFillPrimitive2D( mpOutputDevice->IntersectClipRegion(vcl::Region(aMask)); Wallpaper aWallpaper(aTileImage); aWallpaper.SetColor(COL_TRANSPARENT); - Point aPaperPt(aMaskRect.getX() % aTileImage.GetSizePixel().Width(), - aMaskRect.getY() % aTileImage.GetSizePixel().Height()); + Point aPaperPt(aMaskRect.getX() % nTileWidth, aMaskRect.getY() % nTileHeight); tools::Rectangle aPaperRect(aPaperPt, aTileImage.GetSizePixel()); aWallpaper.SetRect(aPaperRect); mpOutputDevice->DrawWallpaper(aMaskRect, aWallpaper); @@ -1122,8 +1121,7 @@ void VclPixelProcessor2D::processPatternFillPrimitive2D( { Wallpaper aWallpaper(aTileImage); aWallpaper.SetColor(COL_TRANSPARENT); - Point aPaperPt(aMaskRect.getX() % aTileImage.GetSizePixel().Width(), - aMaskRect.getY() % aTileImage.GetSizePixel().Height()); + Point aPaperPt(aMaskRect.getX() % nTileWidth, aMaskRect.getY() % nTileHeight); tools::Rectangle aPaperRect(aPaperPt, aTileImage.GetSizePixel()); aWallpaper.SetRect(aPaperRect); mpOutputDevice->DrawWallpaper(aMaskRect, aWallpaper); |