Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Ensure that the terminating nul byte is also copied.
[simgrid.git] / src / smpi / mpi / smpi_comm.cpp
index 98a41c8..58dd774 100644 (file)
@@ -120,7 +120,7 @@ void Comm::get_name (char* name, int* len)
     return;
   }
   if(this == MPI_COMM_WORLD) {
-    strncpy(name, "WORLD",5);
+    strncpy(name, "WORLD", 6);
     *len = 5;
   } else {
     *len = snprintf(name, MPI_MAX_NAME_STRING, "%p", this);