summaryrefslogtreecommitdiff
path: root/src/lib/libc/string/wcslcpy.c
diff options
context:
space:
mode:
authormillert <>2011-07-24 15:21:28 +0000
committermillert <>2011-07-24 15:21:28 +0000
commitff139186f8d47a589ecba6abd896915137364e16 (patch)
treeb75df96c2084f081131d6c1808bb02e6a9c4f353 /src/lib/libc/string/wcslcpy.c
parent6bfe3ab15fc108576b23dc239c3d8e63b0cdc7bb (diff)
downloadopenbsd-ff139186f8d47a589ecba6abd896915137364e16.tar.gz
openbsd-ff139186f8d47a589ecba6abd896915137364e16.tar.bz2
openbsd-ff139186f8d47a589ecba6abd896915137364e16.zip
Sync wcslcpy and wcslcat with strlcpy and strlcat. OK deraadt@
Diffstat (limited to 'src/lib/libc/string/wcslcpy.c')
-rw-r--r--src/lib/libc/string/wcslcpy.c34
1 files changed, 11 insertions, 23 deletions
diff --git a/src/lib/libc/string/wcslcpy.c b/src/lib/libc/string/wcslcpy.c
index 85f51df35f..f49936a885 100644
--- a/src/lib/libc/string/wcslcpy.c
+++ b/src/lib/libc/string/wcslcpy.c
@@ -1,32 +1,20 @@
1/* $OpenBSD: wcslcpy.c,v 1.4 2006/05/05 15:27:38 millert Exp $ */ 1/* $OpenBSD: wcslcpy.c,v 1.5 2011/07/24 15:21:28 millert Exp $ */
2/* $NetBSD: wcslcpy.c,v 1.2 2001/01/03 14:33:02 lukem Exp $ */ 2/* $NetBSD: wcslcpy.c,v 1.2 2001/01/03 14:33:02 lukem Exp $ */
3/* from OpenBSD: strlcpy.c,v 1.4 1999/05/01 18:56:41 millert Exp */
4 3
5/* 4/*
6 * Copyright (c) 1998 Todd C. Miller <Todd.Miller@courtesan.com> 5 * Copyright (c) 1998 Todd C. Miller <Todd.Miller@courtesan.com>
7 * All rights reserved.
8 * 6 *
9 * Redistribution and use in source and binary forms, with or without 7 * Permission to use, copy, modify, and distribute this software for any
10 * modification, are permitted provided that the following conditions 8 * purpose with or without fee is hereby granted, provided that the above
11 * are met: 9 * copyright notice and this permission notice appear in all copies.
12 * 1. Redistributions of source code must retain the above copyright
13 * notice, this list of conditions and the following disclaimer.
14 * 2. Redistributions in binary form must reproduce the above copyright
15 * notice, this list of conditions and the following disclaimer in the
16 * documentation and/or other materials provided with the distribution.
17 * 3. The name of the author may not be used to endorse or promote products
18 * derived from this software without specific prior written permission.
19 * 10 *
20 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, 11 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
21 * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY 12 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
22 * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL 13 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
23 * THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 14 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
24 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 15 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
25 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 16 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
26 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 17 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
27 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
28 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
29 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 */ 18 */
31 19
32#include <sys/types.h> 20#include <sys/types.h>