reg: Fix a heap corruption when printing specific REG_MULTI_SZ values.
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de> Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
ef36a25aec
commit
7c774e9849
|
@ -587,7 +587,7 @@ static WCHAR *reg_data_to_wchar(DWORD type, const BYTE *src, DWORD size_bytes)
|
|||
}
|
||||
|
||||
tmp_size = size_bytes - two_wchars; /* exclude both null terminators */
|
||||
buffer = HeapAlloc(GetProcessHeap(), 0, tmp_size * 2);
|
||||
buffer = HeapAlloc(GetProcessHeap(), 0, tmp_size * 2 + sizeof(WCHAR));
|
||||
len = tmp_size / sizeof(WCHAR);
|
||||
|
||||
for (i = 0, destindex = 0; i < len; i++, destindex++)
|
||||
|
|
Loading…
Reference in New Issue