diff options
Diffstat (limited to 'jvmfwk')
-rw-r--r-- | jvmfwk/plugins/sunmajor/pluginlib/util.cxx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/jvmfwk/plugins/sunmajor/pluginlib/util.cxx b/jvmfwk/plugins/sunmajor/pluginlib/util.cxx index d8238120b04c..f703fb4c200b 100644 --- a/jvmfwk/plugins/sunmajor/pluginlib/util.cxx +++ b/jvmfwk/plugins/sunmajor/pluginlib/util.cxx @@ -365,7 +365,9 @@ void AsynchReader::execute() { //Save the data we have in m_arData into a temporary array std::unique_ptr<sal_Char[]> arTmp( new sal_Char[m_nDataSize]); - memcpy(arTmp.get(), m_arData.get(), m_nDataSize); + if (m_nDataSize != 0) { + memcpy(arTmp.get(), m_arData.get(), m_nDataSize); + } //Enlarge m_arData to hold the newly read data m_arData.reset(new sal_Char[static_cast<size_t>(m_nDataSize + nRead)]); //Copy back the data that was already in m_arData |