use GNUNET_strlcpy instead of strncpy where possible
[oweals/gnunet.git] / src / util / service.c
index 4fd16f93d8386b1624f80e763167c8b1c642ee9b..d03650501cb894dd8374f256f622a8283f85ca65 100644 (file)
@@ -1061,9 +1061,9 @@ add_unixpath (struct sockaddr **saddrs,
 
   un = GNUNET_new (struct sockaddr_un);
   un->sun_family = AF_UNIX;
-  strncpy (un->sun_path,
-          unixpath,
-          sizeof (un->sun_path) - 1);
+  GNUNET_strlcpy (un->sun_path,
+                 unixpath,
+                 sizeof (un->sun_path));
 #ifdef LINUX
   if (GNUNET_YES == abstract)
     un->sun_path[0] = '\0';