diff --git a/Code/IO/otbGDALImageIO.cxx b/Code/IO/otbGDALImageIO.cxx index e1931aada027c18636aa1882e8cf89627a0ea885..b42f310005f594e879d3d653c331627d594f39dc 100644 --- a/Code/IO/otbGDALImageIO.cxx +++ b/Code/IO/otbGDALImageIO.cxx @@ -1056,6 +1056,10 @@ void GDALImageIO::InternalWriteImageInformation(const void* buffer) } else { + // buffer casted in unsigned long cause under Win32 the adress + // don't begin with 0x, the adress in not interpreted as + // hexadecimal but alpha numeric value, then the conversion to + // integer make us pointing to an non allowed memory block => Crash. std::ostringstream stream; stream << "MEM:::" << "DATAPOINTER=" << (unsigned long)(buffer) << ","