diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2016-09-02 10:59:44 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2016-09-02 10:59:44 +0200 |
commit | cb93207d215b696a05246472ba4d13a7a3a2949d (patch) | |
tree | fd9fb16c3e6e223cbafa2c8eadff9425f57c511b /sc | |
parent | 40f0ae88bc6b6964389073aba62b6af8d55982e5 (diff) |
Avoid calling memcpy with illegal nullptr (when aHiddenValues.empty())
Change-Id: I69801b2618c466e8fa31977feb2b07ec909cebff
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/ui/unoobj/chart2uno.cxx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sc/source/ui/unoobj/chart2uno.cxx b/sc/source/ui/unoobj/chart2uno.cxx index c443058a46bb..79282f576b0e 100644 --- a/sc/source/ui/unoobj/chart2uno.cxx +++ b/sc/source/ui/unoobj/chart2uno.cxx @@ -19,6 +19,7 @@ #include <sal/config.h> +#include <algorithm> #include <utility> #include "chart2uno.hxx" @@ -2628,7 +2629,8 @@ void ScChart2DataSequence::BuildDataCache() // convert the hidden cell list to sequence. m_aHiddenValues.realloc(aHiddenValues.size()); - memcpy(m_aHiddenValues.getArray(), aHiddenValues.data(), sizeof(sal_Int32) * aHiddenValues.size()); + std::copy( + aHiddenValues.begin(), aHiddenValues.end(), m_aHiddenValues.begin()); // Clear the data series cache when the array is re-built. m_aMixedDataCache.realloc(0); |