comphelper/source/streaming/memorystream.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
New commits: commit 3c7378d54b7a04e3f6dfc75a994744bdd953af7b Author: Stephan Bergmann <sberg...@redhat.com> AuthorDate: Sun May 29 19:48:22 2022 +0200 Commit: Stephan Bergmann <sberg...@redhat.com> CommitDate: Sun May 29 19:50:55 2022 +0200 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 <sberg...@redhat.com> Reviewed-by: Stephan Bergmann <sberg...@redhat.com> 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;