mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-01-31 11:30:56 +08:00
* cygheap.cc (cwcsdup): Fix allocation size to accommodate sizeof WCHAR.
(cwcsdup1): Ditto.
This commit is contained in:
parent
098f9c6e48
commit
2bba259eb7
@ -1,3 +1,8 @@
|
||||
2010-04-13 John Bowman <bowman@math.ualberta.ca>
|
||||
|
||||
* cygheap.cc (cwcsdup): Fix allocation size to accommodate sizeof WCHAR.
|
||||
(cwcsdup1): Ditto.
|
||||
|
||||
2010-04-12 Corinna Vinschen <corinna@vinschen.de>
|
||||
|
||||
* include/cygwin/version.h: Bump DLL minor version number to 5.
|
||||
|
@ -363,7 +363,7 @@ extern "C" PWCHAR __stdcall
|
||||
cwcsdup (const PWCHAR s)
|
||||
{
|
||||
MALLOC_CHECK;
|
||||
PWCHAR p = (PWCHAR) cmalloc (HEAP_STR, wcslen (s) + 1);
|
||||
PWCHAR p = (PWCHAR) cmalloc (HEAP_STR, (wcslen (s) + 1) * sizeof (WCHAR));
|
||||
if (!p)
|
||||
return NULL;
|
||||
wcpcpy (p, s);
|
||||
@ -375,7 +375,7 @@ extern "C" PWCHAR __stdcall
|
||||
cwcsdup1 (const PWCHAR s)
|
||||
{
|
||||
MALLOC_CHECK;
|
||||
PWCHAR p = (PWCHAR) cmalloc (HEAP_1_STR, wcslen (s) + 1);
|
||||
PWCHAR p = (PWCHAR) cmalloc (HEAP_1_STR, (wcslen (s) + 1) * sizeof (WCHAR));
|
||||
if (!p)
|
||||
return NULL;
|
||||
wcpcpy (p, s);
|
||||
|
Loading…
x
Reference in New Issue
Block a user