summaryrefslogtreecommitdiff
path: root/lib/libc
diff options
context:
space:
mode:
authorDavid E. O'Brien <obrien@FreeBSD.org>2001-03-05 11:39:51 +0000
committerDavid E. O'Brien <obrien@FreeBSD.org>2001-03-05 11:39:51 +0000
commit5ee963226b9b92e718146cadff5c3463d156931e (patch)
treed68adccb1e3dd08d572c605e54cd401015680978 /lib/libc
parente4d7af4b16e2bebb21b05cdd22b5211c5e114018 (diff)
Notes
Diffstat (limited to 'lib/libc')
-rw-r--r--lib/libc/string/strlcpy.323
1 files changed, 22 insertions, 1 deletions
diff --git a/lib/libc/string/strlcpy.3 b/lib/libc/string/strlcpy.3
index bc20d4595c10..c26a6f31721e 100644
--- a/lib/libc/string/strlcpy.3
+++ b/lib/libc/string/strlcpy.3
@@ -59,8 +59,29 @@ and
take the full size of the buffer (not just the length) and guarantee to
NUL-terminate the result (as long as
.Fa size
-is larger than 0). Note that you should include a byte for the NUL in
+is larger than 0 or, in the case of
+.Fn strlcat ,
+as long as there is at least one byte free in
+.Fa dst ) .
+Note that you should include a byte for the NUL in
.Fa size .
+Also note that
+.Fn strlcpy
+and
+.Fn strlcat
+only operate on true
+.Dq C
+strings.
+This means that for
+.Fn strlcpy
+.Fa src
+must be NUL-terminated and for
+.Fn strlcat
+both
+.Fa src
+and
+.Fa dst
+must be NUL-terminated.
.Pp
The
.Fn strlcpy