summaryrefslogtreecommitdiff
path: root/external/coinmp/ubsan.patch.0
blob: 15733298609830aa4c0f9ef0700a8f94a89effa2 (plain)
1
2
3
4
5
6
7
8
9
10
11
--- Clp/src/ClpParameters.hpp
+++ Clp/src/ClpParameters.hpp
@@ -81,7 +81,7 @@
 template <class T> inline void
 ClpDisjointCopyN( const T * array, const int size, T * newArray)
 {
-     memcpy(reinterpret_cast<void *> (newArray), array, size * sizeof(T));
+     if (size != 0) memcpy(reinterpret_cast<void *> (newArray), array, size * sizeof(T));
 }
 /// And set
 template <class T> inline void