Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Use memcpy instead of strncpy.
[simgrid.git] / src / xbt / RngStream.c
index 816d5d6..b3c1fbe 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2012, 2014. The SimGrid Team.
+/* Copyright (c) 2012-2018. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -287,7 +287,7 @@ RngStream RngStream_CreateStream (const char name[])
    if (name) {
       len = strlen (name);
       g->name = (char *) xbt_malloc ((len + 1) * sizeof (char));
-      strncpy (g->name, name, len + 1);
+      memcpy(g->name, name, len + 1);
    } else
       g->name = 0;
    g->Anti = 0;