mirror of
https://github.com/reactos/wine.git
synced 2025-03-04 10:47:49 +00:00
HeapAlloc for WSTR must allocate len* sizeof(WCHARS).
This commit is contained in:
parent
4679e78432
commit
0e42073cd7
@ -47,7 +47,7 @@ HWND WINAPI HtmlHelpA(HWND caller, LPCSTR filename, UINT command, DWORD data)
|
||||
DWORD len = MultiByteToWideChar( CP_ACP, 0, filename, -1, NULL, 0 );
|
||||
HWND result;
|
||||
|
||||
wfile = HeapAlloc( GetProcessHeap(), 0, len );
|
||||
wfile = HeapAlloc( GetProcessHeap(), 0, len * sizeof(WCHAR));
|
||||
MultiByteToWideChar( CP_ACP, 0, filename, -1, wfile, len );
|
||||
|
||||
result = HtmlHelpW( caller, wfile, command, data );
|
||||
|
@ -1265,14 +1265,14 @@ BOOL WINAPI ImmSetCompositionStringA(
|
||||
comp_len = MultiByteToWideChar(CP_ACP, 0, lpComp, dwCompLen, NULL, 0);
|
||||
if (comp_len)
|
||||
{
|
||||
CompBuffer = (WCHAR*)HeapAlloc(GetProcessHeap(),0,comp_len);
|
||||
CompBuffer = (WCHAR*)HeapAlloc(GetProcessHeap(),0,comp_len * sizeof(WCHAR));
|
||||
MultiByteToWideChar(CP_ACP, 0, lpComp, dwCompLen, CompBuffer, comp_len);
|
||||
}
|
||||
|
||||
read_len = MultiByteToWideChar(CP_ACP, 0, lpRead, dwReadLen, NULL, 0);
|
||||
if (read_len)
|
||||
{
|
||||
ReadBuffer = (WCHAR*)HeapAlloc(GetProcessHeap(),0,read_len);
|
||||
ReadBuffer = (WCHAR*)HeapAlloc(GetProcessHeap(),0,read_len * sizeof(WCHAR));
|
||||
MultiByteToWideChar(CP_ACP, 0, lpRead, dwReadLen, ReadBuffer, read_len);
|
||||
}
|
||||
|
||||
|
@ -1540,7 +1540,7 @@ DWORD WINAPI WNetGetConnectionA( LPCSTR lpLocalName,
|
||||
|
||||
if (len)
|
||||
{
|
||||
PWSTR wideLocalName = (PWSTR)HeapAlloc(GetProcessHeap(), 0, len);
|
||||
PWSTR wideLocalName = (PWSTR)HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR));
|
||||
|
||||
if (wideLocalName)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user