summaryrefslogtreecommitdiff
path: root/lib/libc/string
diff options
context:
space:
mode:
authorchristos <christos@NetBSD.org>2015-04-01 15:20:58 +0000
committerchristos <christos@NetBSD.org>2015-04-01 15:20:58 +0000
commit0879914ef826570dd50d11a577fee23662e2d733 (patch)
tree794868351ffffccb9df78094ca2337803cd1262a /lib/libc/string
parenta184b51d19e5c5df0498ab1690427b9d6420dd4d (diff)
clarify what happens when strings overlap.
Diffstat (limited to 'lib/libc/string')
-rw-r--r--lib/libc/string/strcpy.38
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/libc/string/strcpy.3 b/lib/libc/string/strcpy.3
index daa7b102888..a97638432ac 100644
--- a/lib/libc/string/strcpy.3
+++ b/lib/libc/string/strcpy.3
@@ -30,9 +30,9 @@
.\" SUCH DAMAGE.
.\"
.\" from: @(#)strcpy.3 8.1 (Berkeley) 6/4/93
-.\" $NetBSD: strcpy.3,v 1.20 2009/05/02 09:37:32 wiz Exp $
+.\" $NetBSD: strcpy.3,v 1.21 2015/04/01 15:20:58 christos Exp $
.\"
-.Dd May 1, 2009
+.Dd April 1, 2015
.Dt STRCPY 3
.Os
.Sh NAME
@@ -92,6 +92,10 @@ Otherwise,
is
.Em not
terminated.
+.Pp
+For portability the source and destination strings should not overlap, because
+implementations are allowed to optimize character movement and the standard
+specify that the results are undefined if they do.
.Sh RETURN VALUES
The
.Fn strcpy