From 503589272556fe9c8b582c7c1b56fcefcd42bbc5 Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Mon, 28 Feb 2011 12:05:31 +0000 Subject: Frank, 28812 as modified in 28813: fix allocation of wide array in wcs_ztrdup() --- Src/string.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Src/string.c') diff --git a/Src/string.c b/Src/string.c index 2bd1baea3..04e7446c9 100644 --- a/Src/string.c +++ b/Src/string.c @@ -64,7 +64,7 @@ wcs_ztrdup(const wchar_t *s) if (!s) return NULL; - t = (wchar_t *)zalloc(wcslen((wchar_t *)s) + 1); + t = (wchar_t *)zalloc(sizeof(wchar_t) * (wcslen((wchar_t *)s) + 1)); wcscpy(t, s); return t; } -- cgit 1.4.1