Commit 1cd39515 authored by Dan Kegel's avatar Dan Kegel Committed by Alexandre Julliard

kernel32: Fix write buffer overrun in format_insertW.

parent 0909e8b1
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment