diff options
Diffstat (limited to 'src/lib/libc/string/strcpy.3')
-rw-r--r-- | src/lib/libc/string/strcpy.3 | 34 |
1 files changed, 13 insertions, 21 deletions
diff --git a/src/lib/libc/string/strcpy.3 b/src/lib/libc/string/strcpy.3 index 849184d1f5..7174f7c963 100644 --- a/src/lib/libc/string/strcpy.3 +++ b/src/lib/libc/string/strcpy.3 | |||
@@ -1,4 +1,4 @@ | |||
1 | .\" $OpenBSD: strcpy.3,v 1.20 2013/12/19 20:52:37 millert Exp $ | 1 | .\" $OpenBSD: strcpy.3,v 1.21 2014/04/19 11:30:40 deraadt Exp $ |
2 | .\" | 2 | .\" |
3 | .\" Copyright (c) 1990, 1991 The Regents of the University of California. | 3 | .\" Copyright (c) 1990, 1991 The Regents of the University of California. |
4 | .\" All rights reserved. | 4 | .\" All rights reserved. |
@@ -31,12 +31,12 @@ | |||
31 | .\" 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 |
32 | .\" SUCH DAMAGE. | 32 | .\" SUCH DAMAGE. |
33 | .\" | 33 | .\" |
34 | .Dd $Mdocdate: December 19 2013 $ | 34 | .Dd $Mdocdate: April 19 2014 $ |
35 | .Dt STRCPY 3 | 35 | .Dt STRCPY 3 |
36 | .Os | 36 | .Os |
37 | .Sh NAME | 37 | .Sh NAME |
38 | .Nm strcpy | 38 | .Nm strcpy |
39 | .Nd copy a string | 39 | .Nd copy a string without bounds checking |
40 | .Sh SYNOPSIS | 40 | .Sh SYNOPSIS |
41 | .In string.h | 41 | .In string.h |
42 | .Ft char * | 42 | .Ft char * |
@@ -46,43 +46,35 @@ The | |||
46 | .Fn strcpy | 46 | .Fn strcpy |
47 | function copies the string | 47 | function copies the string |
48 | .Fa src | 48 | .Fa src |
49 | to | ||
50 | .Fa dst | ||
51 | (including the terminating | 49 | (including the terminating |
52 | .Ql \e0 | 50 | .Ql \e0 |
53 | character). | 51 | character) to the buffer |
54 | The string | 52 | .Fa dst . |
53 | .Pp | ||
54 | No bounds checking is performed. | ||
55 | If the buffer | ||
55 | .Fa dst | 56 | .Fa dst |
56 | must be at least as large as | 57 | is not large enough to hold the result, |
57 | .Fa src | 58 | subsequent memory will be damaged. |
58 | to hold the result. | ||
59 | .Pp | 59 | .Pp |
60 | If the | 60 | If the |
61 | .Fa src | 61 | .Fa src |
62 | and | 62 | string is inside the |
63 | .Fa dst | 63 | .Fa dst |
64 | strings overlap, the behavior is undefined. | 64 | buffer, the behavior is undefined. |
65 | .Sh RETURN VALUES | 65 | .Sh RETURN VALUES |
66 | The | 66 | The |
67 | .Fn strcpy | 67 | .Fn strcpy |
68 | function returns | 68 | function returns |
69 | .Fa dst . | 69 | .Fa dst . |
70 | .Sh SEE ALSO | 70 | .Sh SEE ALSO |
71 | .Xr bcopy 3 , | ||
72 | .Xr memccpy 3 , | ||
73 | .Xr memcpy 3 , | ||
74 | .Xr memmove 3 , | ||
75 | .Xr strcat 3 , | ||
76 | .Xr strlcpy 3 , | 71 | .Xr strlcpy 3 , |
77 | .Xr strncpy 3 , | ||
78 | .Xr wcscpy 3 , | 72 | .Xr wcscpy 3 , |
79 | .Xr wcslcpy 3 | 73 | .Xr wcslcpy 3 |
80 | .Sh STANDARDS | 74 | .Sh STANDARDS |
81 | The | 75 | The |
82 | .Fn strcpy | 76 | .Fn strcpy |
83 | and | 77 | function conforms to |
84 | .Fn strncpy | ||
85 | functions conform to | ||
86 | .St -ansiC . | 78 | .St -ansiC . |
87 | .Sh HISTORY | 79 | .Sh HISTORY |
88 | The | 80 | The |