diff options
Diffstat (limited to 'xmlscript/source/xml_helper/xml_byteseq.cxx')
-rw-r--r-- | xmlscript/source/xml_helper/xml_byteseq.cxx | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/xmlscript/source/xml_helper/xml_byteseq.cxx b/xmlscript/source/xml_helper/xml_byteseq.cxx index 24b7e2b6ee47..dc443a968e2d 100644 --- a/xmlscript/source/xml_helper/xml_byteseq.cxx +++ b/xmlscript/source/xml_helper/xml_byteseq.cxx @@ -113,9 +113,11 @@ void BSeqOutputStream::writeBytes( Sequence< sal_Int8 > const & rData ) { sal_Int32 nPos = _seq->size(); _seq->resize( nPos + rData.getLength() ); - memcpy( _seq->data() + nPos, - rData.getConstArray(), - rData.getLength() ); + if (rData.getLength() != 0) { + memcpy( _seq->data() + nPos, + rData.getConstArray(), + rData.getLength() ); + } } void BSeqOutputStream::flush() { |