diff options
Diffstat (limited to 'src/lib/libc/string/wcscpy.3')
-rw-r--r-- | src/lib/libc/string/wcscpy.3 | 34 |
1 files changed, 30 insertions, 4 deletions
diff --git a/src/lib/libc/string/wcscpy.3 b/src/lib/libc/string/wcscpy.3 index a71d54f886..dcc375acbf 100644 --- a/src/lib/libc/string/wcscpy.3 +++ b/src/lib/libc/string/wcscpy.3 | |||
@@ -1,3 +1,5 @@ | |||
1 | .\" $OpenBSD: wcscpy.3,v 1.2 2011/07/25 00:38:53 schwarze Exp $ | ||
2 | .\" | ||
1 | .\" Copyright (c) 1990, 1991 The Regents of the University of California. | 3 | .\" Copyright (c) 1990, 1991 The Regents of the University of California. |
2 | .\" All rights reserved. | 4 | .\" All rights reserved. |
3 | .\" | 5 | .\" |
@@ -29,9 +31,7 @@ | |||
29 | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 31 | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
30 | .\" SUCH DAMAGE. | 32 | .\" SUCH DAMAGE. |
31 | .\" | 33 | .\" |
32 | .\" $OpenBSD: wcscpy.3,v 1.1 2011/07/09 16:32:11 nicm Exp $ | 34 | .Dd $Mdocdate: July 25 2011 $ |
33 | .\" | ||
34 | .Dd $Mdocdate: July 9 2011 $ | ||
35 | .Dt WCSCPY 3 | 35 | .Dt WCSCPY 3 |
36 | .Os | 36 | .Os |
37 | .Sh NAME | 37 | .Sh NAME |
@@ -51,7 +51,9 @@ | |||
51 | .Sh DESCRIPTION | 51 | .Sh DESCRIPTION |
52 | The | 52 | The |
53 | .Fn wcscpy | 53 | .Fn wcscpy |
54 | function copies the wide string | 54 | and |
55 | .Fn wcsncpy | ||
56 | functions copy the wide string | ||
55 | .Fa src | 57 | .Fa src |
56 | to | 58 | to |
57 | .Fa dst | 59 | .Fa dst |
@@ -83,6 +85,9 @@ and | |||
83 | functions return | 85 | functions return |
84 | .Fa dst . | 86 | .Fa dst . |
85 | .Sh SEE ALSO | 87 | .Sh SEE ALSO |
88 | .Xr strcpy 3 , | ||
89 | .Xr strlcpy 3 , | ||
90 | .Xr wcscat 3 , | ||
86 | .Xr wcslcpy 3 , | 91 | .Xr wcslcpy 3 , |
87 | .Xr wmemcpy 3 , | 92 | .Xr wmemcpy 3 , |
88 | .Xr wmemmove 3 | 93 | .Xr wmemmove 3 |
@@ -95,3 +100,24 @@ functions conform to | |||
95 | .St -isoC-99 | 100 | .St -isoC-99 |
96 | and were first introduced in | 101 | and were first introduced in |
97 | .St -isoC-amd1 . | 102 | .St -isoC-amd1 . |
103 | .Sh HISTORY | ||
104 | The | ||
105 | .Fn wcscpy | ||
106 | and | ||
107 | .Fn wcsncpy | ||
108 | functions were ported from | ||
109 | .Nx | ||
110 | and first appeared in | ||
111 | .Ox 3.8 . | ||
112 | .Sh CAVEATS | ||
113 | Using the functions | ||
114 | .Fn wcscpy | ||
115 | and | ||
116 | .Fn wcsncpy | ||
117 | is very error-prone with respect to buffer overflows; | ||
118 | see the EXAMPLES section in | ||
119 | .Xr strcpy 3 | ||
120 | for correct usage. | ||
121 | Using | ||
122 | .Xr wcslcpy 3 | ||
123 | is a better choice in most cases. | ||