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:
parent
df39830846
commit
ed16704cea
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue