kernel32: Fix write buffer overrun in format_insertW.

This commit is contained in:
Dan Kegel 2009-12-01 21:24:11 -08:00 committed by Alexandre Julliard
parent 0909e8b18c
commit 1cd395153d

View file

@ -356,7 +356,7 @@ static LPCWSTR format_insertW( int insert, LPCWSTR format, DWORD flags,
(format[0] == 'C'))
{
char ch = arg;
wstring = HeapAlloc( GetProcessHeap(), 0, 2 );
wstring = HeapAlloc( GetProcessHeap(), 0, 2 * sizeof(WCHAR) );
MultiByteToWideChar( CP_ACP, 0, &ch, 1, wstring, 1 );
wstring[1] = 0;
arg = (ULONG_PTR)wstring;