diff options
Diffstat (limited to 'vcl/source/gdi/dibtools.cxx')
-rw-r--r-- | vcl/source/gdi/dibtools.cxx | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/vcl/source/gdi/dibtools.cxx b/vcl/source/gdi/dibtools.cxx index cf3f68660513..8814965eee89 100644 --- a/vcl/source/gdi/dibtools.cxx +++ b/vcl/source/gdi/dibtools.cxx @@ -1310,10 +1310,15 @@ bool ImplWriteDIBBits(SvStream& rOStm, BitmapReadAccess& rAcc, BitmapReadAccess* } break; + case 24: + { + //valgrind, zero out the trailing unused alignment bytes + size_t nUnusedBytes = nAlignedWidth - nWidth * 3; + memset(pBuf.get() + nAlignedWidth - nUnusedBytes, 0, nUnusedBytes); + } + SAL_FALLTHROUGH; // #i59239# fallback to 24 bit format, if bitcount is non-default default: - // FALLTHROUGH intended - case 24: { BitmapColor aPixelColor; const bool bWriteAlpha(32 == nBitCount && pAccAlpha); |