Index: uspace/lib/libc/generic/loader.c
===================================================================
--- uspace/lib/libc/generic/loader.c	(revision 095003a87225b672e2979a6de2d669667aa1d735)
+++ uspace/lib/libc/generic/loader.c	(revision 2bf493609baf3a5f3841a4b043af9180bc6e6547)
@@ -181,5 +181,5 @@
 
 	while (*ap != NULL) {
-		str_ncpy(dp, *ap, buffer_size - (dp - arg_buf));
+		str_cpy(dp, buffer_size - (dp - arg_buf), *ap);
 		dp += str_size(*ap) + 1;
 
Index: uspace/lib/libc/generic/string.c
===================================================================
--- uspace/lib/libc/generic/string.c	(revision 095003a87225b672e2979a6de2d669667aa1d735)
+++ uspace/lib/libc/generic/string.c	(revision 2bf493609baf3a5f3841a4b043af9180bc6e6547)
@@ -463,36 +463,69 @@
 }
 
-/** Copy NULL-terminated string.
- *
- * Copy source string @a src to destination buffer @a dst.
- * No more than @a size bytes are written. NULL-terminator is always
- * written after the last succesfully copied character (i.e. if the
- * destination buffer is has at least 1 byte, it will be always
- * NULL-terminated).
- *
- * @param src   Source string.
+/** Copy string.
+ *
+ * Copy source string @a src to destination buffer @a dest.
+ * No more than @a size bytes are written. If the size of the output buffer
+ * is at least one byte, the output string will always be well-formed, i.e.
+ * null-terminated and containing only complete characters.
+ *
  * @param dst   Destination buffer.
  * @param count Size of the destination buffer.
- *
- */
-void str_ncpy(char *dst, const char *src, size_t size)
-{
-	/* No space for the NULL-terminator in the buffer */
+ * @param src   Source string.
+ */
+void str_cpy(char *dest, size_t size, const char *src)
+{
+	wchar_t ch;
+	size_t src_off;
+	size_t dest_off;
+
+	/* No space for the NULL-terminator in the buffer. */
 	if (size == 0)
 		return;
 	
+	src_off = 0;
+	dest_off = 0;
+
+	while ((ch = str_decode(src, &src_off, STR_NO_LIMIT)) != 0) {
+		if (chr_encode(ch, dest, &dest_off, size - 1) != EOK)
+			break;
+	}
+
+	dest[dest_off] = '\0';
+}
+
+/** Copy size-limited substring.
+ *
+ * Copy source string @a src to destination buffer @a dest.
+ * No more than @a size bytes are written. If the size of the output buffer
+ * is at least one byte, the output string will always be well-formed, i.e.
+ * null-terminated and containing only complete characters.
+ *
+ * No more than @a n bytes are read from the input string, so it does not
+ * have to be null-terminated.
+ *
+ * @param dst   Destination buffer.
+ * @param count Size of the destination buffer.
+ * @param src   Source string.
+ */
+void str_ncpy(char *dest, size_t size, const char *src, size_t n)
+{
 	wchar_t ch;
-	size_t str_off = 0;
-	size_t dst_off = 0;
-	
-	while ((ch = str_decode(src, &str_off, STR_NO_LIMIT)) != 0) {
-		if (chr_encode(ch, dst, &dst_off, size) != EOK)
+	size_t src_off;
+	size_t dest_off;
+
+	/* No space for the null terminator in the buffer. */
+	if (size == 0)
+		return;
+	
+	src_off = 0;
+	dest_off = 0;
+
+	while ((ch = str_decode(src, &src_off, n)) != 0) {
+		if (chr_encode(ch, dest, &dest_off, size - 1) != EOK)
 			break;
 	}
-	
-	if (dst_off >= size)
-		dst[size - 1] = 0;
-	else
-		dst[dst_off] = 0;
+
+	dest[dest_off] = '\0';
 }
 
@@ -799,13 +832,4 @@
 }
 
-char *strcpy(char *dest, const char *src)
-{
-	char *orig = dest;
-	
-	while ((*(dest++) = *(src++)))
-		;
-	return orig;
-}
-
 char *strcat(char *dest, const char *src)
 {
Index: uspace/lib/libc/generic/vfs/vfs.c
===================================================================
--- uspace/lib/libc/generic/vfs/vfs.c	(revision 095003a87225b672e2979a6de2d669667aa1d735)
+++ uspace/lib/libc/generic/vfs/vfs.c	(revision 2bf493609baf3a5f3841a4b043af9180bc6e6547)
@@ -77,5 +77,5 @@
 			return NULL;
 		}
-		str_ncpy(ncwd_path_nc, cwd_path, cwd_size + 1 + size + 1);
+		str_cpy(ncwd_path_nc, cwd_size + 1 + size + 1, cwd_path);
 		ncwd_path_nc[cwd_size] = '/';
 		ncwd_path_nc[cwd_size + 1] = '\0';
@@ -535,5 +535,5 @@
 		return NULL;
 	}
-	str_ncpy(buf, cwd_path, size);
+	str_cpy(buf, size, cwd_path);
 	futex_up(&cwd_futex);
 	return buf;
