oleaut32: Fix invalid memory access on 64-bit when warn+heap is used.

Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Sebastian Lackner 2016-01-22 07:03:08 +01:00 committed by Alexandre Julliard
parent df39830846
commit ed16704cea
1 changed files with 1 additions and 1 deletions

View File

@ -309,7 +309,7 @@ void WINAPI SysFreeString(BSTR str)
cache_entry->cnt++;
if(WARN_ON(heap)) {
unsigned n = bstr_alloc_size(bstr->size) / sizeof(DWORD) - 1;
unsigned n = (alloc_size-FIELD_OFFSET(bstr_t, u.ptr))/sizeof(DWORD);
for(i=0; i<n; i++)
bstr->u.dwptr[i] = ARENA_FREE_FILLER;
}