summaryrefslogtreecommitdiff
path: root/src/lib/libc/string/wcslcpy.3
diff options
context:
space:
mode:
authormillert <>2013-09-25 21:49:31 +0000
committermillert <>2013-09-25 21:49:31 +0000
commitd43fbdbe15661679852f61d404fabacd5aa30b48 (patch)
treee6b591457634e0ef31f70790dd43eb3915ca4b04 /src/lib/libc/string/wcslcpy.3
parent2d453f9cfc595e35f9eb087dd002625195c31659 (diff)
downloadopenbsd-d43fbdbe15661679852f61d404fabacd5aa30b48.tar.gz
openbsd-d43fbdbe15661679852f61d404fabacd5aa30b48.tar.bz2
openbsd-d43fbdbe15661679852f61d404fabacd5aa30b48.zip
According to POSIX, if the src and dst strings overlap, the behavior
is undefined. Add a warning to that effect. OK deraadt@ jmc@
Diffstat (limited to 'src/lib/libc/string/wcslcpy.3')
-rw-r--r--src/lib/libc/string/wcslcpy.310
1 files changed, 8 insertions, 2 deletions
diff --git a/src/lib/libc/string/wcslcpy.3 b/src/lib/libc/string/wcslcpy.3
index a976654ccc..7af6c74614 100644
--- a/src/lib/libc/string/wcslcpy.3
+++ b/src/lib/libc/string/wcslcpy.3
@@ -1,4 +1,4 @@
1.\" $OpenBSD: wcslcpy.3,v 1.5 2013/07/16 15:21:11 schwarze Exp $ 1.\" $OpenBSD: wcslcpy.3,v 1.6 2013/09/25 21:49:31 millert Exp $
2.\" 2.\"
3.\" Copyright (c) 1998, 2000 Todd C. Miller <Todd.Miller@courtesan.com> 3.\" Copyright (c) 1998, 2000 Todd C. Miller <Todd.Miller@courtesan.com>
4.\" 4.\"
@@ -14,7 +14,7 @@
14.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 14.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 15.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16.\" 16.\"
17.Dd $Mdocdate: July 16 2013 $ 17.Dd $Mdocdate: September 25 2013 $
18.Dt WCSLCPY 3 18.Dt WCSLCPY 3
19.Os 19.Os
20.Sh NAME 20.Sh NAME
@@ -88,6 +88,12 @@ It will append at most
88.Fa size 88.Fa size
89\(mi wcslen(dst) \(mi 1 wide characters, terminating the result with a null 89\(mi wcslen(dst) \(mi 1 wide characters, terminating the result with a null
90wide character. 90wide character.
91.Pp
92If the
93.Fa src
94and
95.Fa dst
96strings overlap, the behavior is undefined.
91.Sh RETURN VALUES 97.Sh RETURN VALUES
92The 98The
93.Fn wcslcpy 99.Fn wcslcpy