diff options
author | 2014-10-08 05:27:17 +0000 | |
---|---|---|
committer | 2014-10-08 05:27:17 +0000 | |
commit | 814699410879c4708270b7ece571d61895612565 (patch) | |
tree | 5d252887664b486448f122c45bffc43fccc016a9 /lib/libc/string/wcsdup.c | |
parent | Remove the i830/i845 pipe A force quirks, matching changes (diff) | |
download | wireguard-openbsd-814699410879c4708270b7ece571d61895612565.tar.xz wireguard-openbsd-814699410879c4708270b7ece571d61895612565.zip |
obvious malloc -> reallocarray, for mult int oflow
Diffstat (limited to 'lib/libc/string/wcsdup.c')
-rw-r--r-- | lib/libc/string/wcsdup.c | 4 |
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); |