office-gobmx/external/coinmp/ubsan.patch.0
Stephan Bergmann c8346d77e7 external/coinmp: -fsanitize=nonnull-attribute
Change-Id: I487e772395defa9aae2ce3eb040b8c7d92720cb2
2015-06-02 17:35:20 +02:00

11 lines
394 B
Text

--- 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