+.PP
+(Of course, the above technique ignores the fact that, if
+.I src
+contains more than
+.I "buflen\ \-\ 1"
+bytes, information is lost in the copying to
+.IR dest .)
+.\"
+.SS strlcpy()
+Some systems (the BSDs, Solaris, and others) provide the following function:
+.PP
+ size_t strlcpy(char *dest, const char *src, size_t size);
+.PP
+.\" http://static.usenix.org/event/usenix99/full_papers/millert/millert_html/index.html
+.\" "strlcpy and strlcat - consistent, safe, string copy and concatenation"
+.\" 1999 USENIX Annual Technical Conference
+This function is similar to
+.BR strncpy (),
+but it copies at most
+.I size\-1
+bytes to
+.IR dest ,
+always adds a terminating null byte,
+and does not pad the destination with (further) null bytes.
+This function fixes some of the problems of
+.BR strcpy ()
+and
+.BR strncpy (),
+but the caller must still handle the possibility of data loss if
+.I size
+is too small.
+The return value of the function is the length of
+.IR src ,
+which allows truncation to be easily detected:
+if the return value is greater than or equal to
+.IR size ,
+truncation occurred.
+If loss of data matters, the caller
+.I must
+either check the arguments before the call,
+or test the function return value.
+.BR strlcpy ()
+is not present in glibc and is not standardized by POSIX,
+.\" https://lwn.net/Articles/506530/
+but is available on Linux via the
+.IR libbsd
+library.