Commit ed16704c authored by Sebastian Lackner's avatar Sebastian Lackner Committed by Alexandre Julliard

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

parent df398308
......@@ -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;
}
......
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