Commit 7c774e98 authored by Sebastian Lackner's avatar Sebastian Lackner Committed by Alexandre Julliard

reg: Fix a heap corruption when printing specific REG_MULTI_SZ values.

parent ef36a25a
......@@ -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++)
......
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