diff options
| author | Peter Stephenson <pws@users.sourceforge.net> | 2011-02-28 12:05:31 +0000 |
|---|---|---|
| committer | Peter Stephenson <pws@users.sourceforge.net> | 2011-02-28 12:05:31 +0000 |
| commit | 503589272556fe9c8b582c7c1b56fcefcd42bbc5 (patch) | |
| tree | e6e17d85630ce997ec597fb2a2e238372da60df4 /Src/string.c | |
| parent | Nikolai Weibull's latest version. (diff) | |
| download | zsh-503589272556fe9c8b582c7c1b56fcefcd42bbc5.tar zsh-503589272556fe9c8b582c7c1b56fcefcd42bbc5.tar.gz zsh-503589272556fe9c8b582c7c1b56fcefcd42bbc5.tar.bz2 zsh-503589272556fe9c8b582c7c1b56fcefcd42bbc5.tar.lz zsh-503589272556fe9c8b582c7c1b56fcefcd42bbc5.tar.xz zsh-503589272556fe9c8b582c7c1b56fcefcd42bbc5.tar.zst zsh-503589272556fe9c8b582c7c1b56fcefcd42bbc5.zip | |
Frank, 28812 as modified in 28813:
fix allocation of wide array in wcs_ztrdup()
Diffstat (limited to 'Src/string.c')
| -rw-r--r-- | Src/string.c | 2 |
1 files changed, 1 insertions, 1 deletions
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; } |
