mirror of
https://github.com/zsh-users/zsh
synced 2024-09-15 22:20:22 +00:00
Frank, 28812 as modified in 28813:
fix allocation of wide array in wcs_ztrdup()
This commit is contained in:
parent
f2c4bb42f0
commit
5035892725
|
@ -1,3 +1,9 @@
|
||||||
|
2011-02-28 Peter Stephenson <pws@csr.com>
|
||||||
|
|
||||||
|
* Frank, 28812, modified as in 28813: Src/string.c: wcs_ztrdup()
|
||||||
|
needs to allocate array of wchar_t. Looks like this isn't
|
||||||
|
currently used anywhere.
|
||||||
|
|
||||||
2011-02-27 Wayne Davison <wayned@users.sourceforge.net>
|
2011-02-27 Wayne Davison <wayned@users.sourceforge.net>
|
||||||
|
|
||||||
* Nikolai Weibull: 28649,28804: Completion/Unix/Command/_git:
|
* Nikolai Weibull: 28649,28804: Completion/Unix/Command/_git:
|
||||||
|
@ -14264,5 +14270,5 @@
|
||||||
|
|
||||||
*****************************************************
|
*****************************************************
|
||||||
* This is used by the shell to define $ZSH_PATCHLEVEL
|
* This is used by the shell to define $ZSH_PATCHLEVEL
|
||||||
* $Revision: 1.5209 $
|
* $Revision: 1.5210 $
|
||||||
*****************************************************
|
*****************************************************
|
||||||
|
|
|
@ -64,7 +64,7 @@ wcs_ztrdup(const wchar_t *s)
|
||||||
|
|
||||||
if (!s)
|
if (!s)
|
||||||
return NULL;
|
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);
|
wcscpy(t, s);
|
||||||
return t;
|
return t;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue