diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2022-05-29 19:48:22 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2022-05-29 19:50:55 +0200 |
commit | 3c7378d54b7a04e3f6dfc75a994744bdd953af7b (patch) | |
tree | a303a0728ff8e155ddf3a22d3a40e5d7fdabbc56 /comphelper | |
parent | e42703d9f23d2235c3a1d61b06610248627595c0 (diff) |
Fix mid-air collision
...between d203e3f35dc4547bb46151637ba6054d13025d01 "use comphelper::ByteWriter
in UNOMemoryStream" and 3ca1a169e571a829598a00a2ffef6e1018d2cb18 "Use
boost::noinit_adaptor"
Change-Id: Ie890288485f499505184a12b0797d5fc9b877922
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135098
Tested-by: Stephan Bergmann <sbergman@redhat.com>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'comphelper')
-rw-r--r-- | comphelper/source/streaming/memorystream.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/comphelper/source/streaming/memorystream.cxx b/comphelper/source/streaming/memorystream.cxx index 2239bf8e4a93..8c3dc902f48f 100644 --- a/comphelper/source/streaming/memorystream.cxx +++ b/comphelper/source/streaming/memorystream.cxx @@ -240,10 +240,10 @@ sal_Int32 UNOMemoryStream::writeSomeBytes( const sal_Int8* pInData, sal_Int32 nB if( static_cast< sal_Int32 >( nNewSize ) > static_cast< sal_Int32 >( maData.size() ) ) maData.resize( nNewSize ); - NoInitInt8* pData = &(*maData.begin()); - NoInitInt8* pCursor = &(pData[mnCursor]); + sal_Int8* pData = &(*maData.begin()); + sal_Int8* pCursor = &(pData[mnCursor]); // cast to avoid -Werror=class-memaccess - memcpy(static_cast<void*>(pCursor), pInData, nBytesToWrite); + memcpy(pCursor, pInData, nBytesToWrite); mnCursor += nBytesToWrite; return nBytesToWrite; |