summaryrefslogtreecommitdiffstats
path: root/lib/libc/string/strcat.3
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2014-04-19 11:30:40 +0000
committerderaadt <deraadt@openbsd.org>2014-04-19 11:30:40 +0000
commit5d354709047d762de49ee774c57d23b877c33736 (patch)
tree796da3f35cbcf11acc1f91d1e1c3e7942e074830 /lib/libc/string/strcat.3
parentwhen copying socket path, check that we didnt truncate it which would cause (diff)
downloadwireguard-openbsd-5d354709047d762de49ee774c57d23b877c33736.tar.xz
wireguard-openbsd-5d354709047d762de49ee774c57d23b877c33736.zip
Use somewhat harsher language and better examples; demonstrate that
non-dangerous use functions is difficult. ok guenther
Diffstat (limited to 'lib/libc/string/strcat.3')
-rw-r--r--lib/libc/string/strcat.321
1 files changed, 9 insertions, 12 deletions
diff --git a/lib/libc/string/strcat.3 b/lib/libc/string/strcat.3
index fba992edd9b..7368d08e4b3 100644
--- a/lib/libc/string/strcat.3
+++ b/lib/libc/string/strcat.3
@@ -1,4 +1,4 @@
-.\" $OpenBSD: strcat.3,v 1.16 2013/12/19 20:52:37 millert Exp $
+.\" $OpenBSD: strcat.3,v 1.17 2014/04/19 11:30:40 deraadt Exp $
.\"
.\" Copyright (c) 1990, 1991 The Regents of the University of California.
.\" All rights reserved.
@@ -31,12 +31,12 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd $Mdocdate: December 19 2013 $
+.Dd $Mdocdate: April 19 2014 $
.Dt STRCAT 3
.Os
.Sh NAME
.Nm strcat
-.Nd concatenate two strings
+.Nd concatenate two strings without bounds checking
.Sh SYNOPSIS
.In string.h
.Ft char *
@@ -50,22 +50,19 @@ to the end of the NUL-terminated string
.Fa s ,
then adds a terminating
.Ql \e0 .
-The string
-.Fa s
-must have sufficient space to hold the result.
+.Pp
+No bounds checking is performed.
+If the buffer
+.Fa dst
+is not large enough to hold the result,
+subsequent memory will be damaged.
.Sh RETURN VALUES
The
.Fn strcat
function return the pointer
.Fa s .
.Sh SEE ALSO
-.Xr bcopy 3 ,
-.Xr memccpy 3 ,
-.Xr memcpy 3 ,
-.Xr memmove 3 ,
-.Xr strcpy 3 ,
.Xr strlcpy 3 ,
-.Xr strncat 3 ,
.Xr wcscat 3 ,
.Xr wcslcpy 3
.Sh STANDARDS