summaryrefslogtreecommitdiffstats
path: root/lib/libc/string/wcsdup.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc/string/wcsdup.c')
-rw-r--r--lib/libc/string/wcsdup.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libc/string/wcsdup.c b/lib/libc/string/wcsdup.c
index 57a328a8c2b..085d1c445d9 100644
--- a/lib/libc/string/wcsdup.c
+++ b/lib/libc/string/wcsdup.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: wcsdup.c,v 1.1 2011/07/04 04:37:34 nicm Exp $ */
+/* $OpenBSD: wcsdup.c,v 1.2 2014/10/08 05:27:17 deraadt Exp $ */
/* $NetBSD: wcsdup.c,v 1.3 2008/05/26 13:17:48 haad Exp $ */
/*
@@ -22,7 +22,7 @@ wcsdup(const wchar_t *str)
size_t len;
len = wcslen(str) + 1;
- copy = malloc(len * sizeof (wchar_t));
+ copy = reallocarray(NULL, len, sizeof(wchar_t));
if (!copy)
return (NULL);