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:
Sebastian Lackner 2016-04-22 19:35:01 +02:00 committed by Alexandre Julliard
parent ef36a25aec
commit 7c774e9849
1 changed files with 1 additions and 1 deletions

View File

@ -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++)