From 13bc86c03422d381ae7bf19a6132d370e93a7675 Mon Sep 17 00:00:00 2001 From: Huw Davies Date: Thu, 21 Jan 2016 10:29:49 +0000 Subject: [PATCH] oleaut32: Use the helper to access bstr_t. Signed-off-by: Huw Davies Signed-off-by: Jacek Caban Signed-off-by: Alexandre Julliard --- dlls/oleaut32/oleaut.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dlls/oleaut32/oleaut.c b/dlls/oleaut32/oleaut.c index 214421c778f..8a22c2e141c 100644 --- a/dlls/oleaut32/oleaut.c +++ b/dlls/oleaut32/oleaut.c @@ -360,7 +360,8 @@ int WINAPI SysReAllocStringLen(BSTR* old, const OLECHAR* str, unsigned int len) if (*old!=NULL) { BSTR old_copy = *old; DWORD newbytelen = len*sizeof(WCHAR); - bstr_t *bstr = HeapReAlloc(GetProcessHeap(),0,((DWORD*)*old)-1,bstr_alloc_size(newbytelen)); + bstr_t *old_bstr = bstr_from_str(*old); + bstr_t *bstr = HeapReAlloc(GetProcessHeap(), 0, old_bstr, bstr_alloc_size(newbytelen)); *old = bstr->u.str; bstr->size = newbytelen; /* Subtle hidden feature: The old string data is still there