diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2016-09-01 13:48:04 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2016-09-01 13:48:04 +0200 |
commit | 802f2c88af919b18f08bf4568964ad7087bf9e8a (patch) | |
tree | d46e4ec4aa67b9a7d4a78f72ea91adf37cd8e4fc /vcl | |
parent | 9292ca07dd3f9ee9dedd765ba7696a626bc25476 (diff) |
For Valgrind, zero out alignment bytes of 24-bit bitmap, too
...caused false warnings in CppunitTest_sw_filters_test testing
sw/qa/core/exportdata/html/pass/cp1000068.odt
Change-Id: I48943d5d4999e1b8c9a7ab50e39e65b2171b1b94
Diffstat (limited to 'vcl')
-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); |