diff --git a/xmlscript/source/xml_helper/xml_byteseq.cxx b/xmlscript/source/xml_helper/xml_byteseq.cxx index a4cca34e2649..7a976463d048 100644 --- a/xmlscript/source/xml_helper/xml_byteseq.cxx +++ b/xmlscript/source/xml_helper/xml_byteseq.cxx @@ -120,9 +120,9 @@ void BSeqOutputStream::writeBytes( Sequence< sal_Int8 > const & rData ) sal_Int32 nPos = _seq->size(); _seq->resize( nPos + rData.getLength() ); if (rData.getLength() != 0) { - memcpy( _seq->data() + nPos, - rData.getConstArray(), - rData.getLength() ); + std::copy(rData.getConstArray(), + rData.getConstArray() + rData.getLength(), + _seq->begin() + nPos); } } void BSeqOutputStream::flush()