diff options
Diffstat (limited to 'tools')
-rw-r--r-- | tools/source/stream/stream.cxx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/source/stream/stream.cxx b/tools/source/stream/stream.cxx index 2e98799d2b9d..b96da82b326a 100644 --- a/tools/source/stream/stream.cxx +++ b/tools/source/stream/stream.cxx @@ -1771,7 +1771,10 @@ sal_Size SvMemoryStream::GetData( void* pData, sal_Size nCount ) sal_Size nMaxCount = nEndOfData-nPos; if( nCount > nMaxCount ) nCount = nMaxCount; - memcpy( pData, pBuf+nPos, (size_t)nCount ); + if (nCount != 0) + { + memcpy( pData, pBuf+nPos, (size_t)nCount ); + } nPos += nCount; return nCount; } |