Index: uspace/lib/libc/generic/string.c
===================================================================
--- uspace/lib/libc/generic/string.c	(revision 4482bc7dd7bb058b7f0db7a9caf5a892cca5a820)
+++ uspace/lib/libc/generic/string.c	(revision 92393339320e8b26d3efc3a31ddafb4aa99091ae)
@@ -36,4 +36,5 @@
 #include <string.h>
 #include <stdlib.h>
+#include <assert.h>
 #include <limits.h>
 #include <ctype.h>
@@ -471,5 +472,5 @@
  *
  * @param dst   Destination buffer.
- * @param count Size of the destination buffer.
+ * @param count Size of the destination buffer (must be > 0).
  * @param src   Source string.
  */
@@ -480,7 +481,6 @@
 	size_t dest_off;
 
-	/* No space for the NULL-terminator in the buffer. */
-	if (size == 0)
-		return;
+	/* There must be space for a null terminator in the buffer. */
+	assert(size > 0);
 	
 	src_off = 0;
@@ -497,8 +497,8 @@
 /** 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.
+ * Copy prefix of string @a src of max. size @a size to destination buffer
+ * @a dest. No more than @a size bytes are written. 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
@@ -506,6 +506,7 @@
  *
  * @param dst   Destination buffer.
- * @param count Size of the destination buffer.
+ * @param count Size of the destination buffer (must be > 0).
  * @param src   Source string.
+ * @param n	Maximum number of bytes to read from @a src.
  */
 void str_ncpy(char *dest, size_t size, const char *src, size_t n)
@@ -515,7 +516,6 @@
 	size_t dest_off;
 
-	/* No space for the null terminator in the buffer. */
-	if (size == 0)
-		return;
+	/* There must be space for a null terminator in the buffer. */
+	assert(size > 0);
 	
 	src_off = 0;
