mirror of
https://github.com/reactos/reactos.git
synced 2024-12-27 09:34:43 +00:00
Don't tell to MultiByteToWideChar that buffer is bigger than its real size. The size is in characters, not in bytes.
Spotted by Robert Shearman <rob@codeweavers.com> svn path=/trunk/; revision=18152
This commit is contained in:
parent
b6c1b16e17
commit
06bd1b672d
1 changed files with 1 additions and 2 deletions
|
@ -956,8 +956,7 @@ static struct inf_file *parse_file( HANDLE handle, const WCHAR *class, UINT *err
|
|||
WCHAR *new_buff = HeapAlloc( GetProcessHeap(), 0, size * sizeof(WCHAR) );
|
||||
if (new_buff)
|
||||
{
|
||||
DWORD len = MultiByteToWideChar( CP_ACP, 0, buffer, size, new_buff,
|
||||
size * sizeof(WCHAR) );
|
||||
DWORD len = MultiByteToWideChar( CP_ACP, 0, buffer, size, new_buff, size );
|
||||
err = parse_buffer( file, new_buff, new_buff + len, error_line );
|
||||
HeapFree( GetProcessHeap(), 0, new_buff );
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue