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