summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/libc/string/strlcpy.325
1 files changed, 22 insertions, 3 deletions
diff --git a/src/lib/libc/string/strlcpy.3 b/src/lib/libc/string/strlcpy.3
index 03a80e6c79..5acbcce148 100644
--- a/src/lib/libc/string/strlcpy.3
+++ b/src/lib/libc/string/strlcpy.3
@@ -1,6 +1,6 @@
1.\" $OpenBSD: strlcpy.3,v 1.7 2000/04/21 15:24:20 aaron Exp $ 1.\" $OpenBSD: strlcpy.3,v 1.8 2000/06/01 04:02:05 millert Exp $
2.\" 2.\"
3.\" Copyright (c) 1998 Todd C. Miller <Todd.Miller@courtesan.com> 3.\" Copyright (c) 1998, 2000 Todd C. Miller <Todd.Miller@courtesan.com>
4.\" All rights reserved. 4.\" All rights reserved.
5.\" 5.\"
6.\" Redistribution and use in source and binary forms, with or without 6.\" Redistribution and use in source and binary forms, with or without
@@ -56,9 +56,28 @@ and
56take the full size of the buffer (not just the length) and guarantee to 56take the full size of the buffer (not just the length) and guarantee to
57NUL-terminate the result (as long as 57NUL-terminate the result (as long as
58.Fa size 58.Fa size
59is larger than 0). 59is larger than 0 or, in the case of
60.Fn strlcat ,
61as long as there is at least one byte free in
62.Fa dst ) .
60Note that you should include a byte for the NUL in 63Note that you should include a byte for the NUL in
61.Fa size . 64.Fa size .
65Also note that
66.Fn strlcpy
67and
68.Fn strlcat
69only operate on true
70.Dq C
71strings. This means that for
72.Fn strlcpy
73.Fa src
74must be NUL-terminated and for
75.Fn strlcat
76both
77.Fa src
78and
79.Fa dst
80must be NUL-terminated.
62.Pp 81.Pp
63The 82The
64.Fn strlcpy 83.Fn strlcpy