strncat -> silc_strncat.
[silc.git] / lib / silcclient / client_ftp.c
index c335121fd70dc93c7c7a72c35347867fae491c42..7aac6b32f423b90a095385f5d33794b4625ef2a8 100644 (file)
@@ -827,9 +827,9 @@ silc_client_file_send(SilcClient client,
   session->server = TRUE;
   silc_dlist_add(conn->ftp_sessions, session);
 
-  path = silc_calloc(strlen(filepath) + 8, sizeof(*path));
-  strcat(path, "file://");
-  strncat(path, filepath, strlen(filepath));
+  path = silc_calloc(strlen(filepath) + 9, sizeof(*path));
+  silc_strncat(path, strlen(filepath) + 9, "file://", 7);
+  silc_strncat(path, strlen(filepath) + 9, filepath, strlen(filepath));
 
   /* Allocate memory filesystem and put the file to it */
   if (strrchr(path, '/'))