Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libc/string clarify what happens when strings overlap.
details: https://anonhg.NetBSD.org/src/rev/9f48dc15cb75
branches: trunk
changeset: 807222:9f48dc15cb75
user: christos <christos%NetBSD.org@localhost>
date: Wed Apr 01 15:20:58 2015 +0000
description:
clarify what happens when strings overlap.
diffstat:
lib/libc/string/strcpy.3 | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diffs (26 lines):
diff -r caa78aa582f6 -r 9f48dc15cb75 lib/libc/string/strcpy.3
--- a/lib/libc/string/strcpy.3 Wed Apr 01 07:44:18 2015 +0000
+++ b/lib/libc/string/strcpy.3 Wed Apr 01 15:20:58 2015 +0000
@@ -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 @@
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
Home |
Main Index |
Thread Index |
Old Index