vcl/source/outdev/bitmap.cxx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)
New commits: commit 99e3ab6effa9356a1a444160e60ed8df099b15a3 Author: Armin Le Grand <armin.le.gr...@cib.de> Date: Mon Nov 9 14:00:50 2015 +0100 tdf#95481 catch out-of-range access in vcl bitmap blendBitmap24 assumes bitmap is 2 lines high for doing interpolation. For bitmaps of height 1, really nothing to interpolate there. Fix cornercase by 'blending' between the very same line instead. Change-Id: I9b94000aa563e525d0bb2418346ad2c86af26df8 Reviewed-on: https://gerrit.libreoffice.org/19863 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Norbert Thiebaud <nthieb...@gmail.com> diff --git a/vcl/source/outdev/bitmap.cxx b/vcl/source/outdev/bitmap.cxx index a2e30aa..adddcaa 100644 --- a/vcl/source/outdev/bitmap.cxx +++ b/vcl/source/outdev/bitmap.cxx @@ -810,11 +810,13 @@ public: const long nMapY = mpMapY[nY]; const long nMapFY = mpMapYOffset[nY]; - pLine0 = pSource->GetScanline(nMapY); - pLine1 = pSource->GetScanline(nMapY + 1); + pLine0 = pSource->GetScanline(nMapY); + // tdf#95481 guard nMapY + 1 to be within bounds + pLine1 = (nMapY + 1 < pSource->Height()) ? pSource->GetScanline(nMapY + 1) : pLine0; pLineAlpha0 = pSourceAlpha->GetScanline(nMapY); - pLineAlpha1 = pSourceAlpha->GetScanline(nMapY + 1); + // tdf#95481 guard nMapY + 1 to be within bounds + pLineAlpha1 = (nMapY + 1 < pSourceAlpha->Height()) ? pSourceAlpha->GetScanline(nMapY + 1) : pLineAlpha0; pDestScanline = pDestination->GetScanline(nY); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits