Andrew Eikum : oleaut32: Don't clear BSTR size.

Alexandre Julliard julliard at wine.codeweavers.com
Wed Jan 6 14:50:56 CST 2016


Module: wine
Branch: master
Commit: 3bc2ec33712ed57abf92b8014dda334cb9046d13
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=3bc2ec33712ed57abf92b8014dda334cb9046d13

Author: Andrew Eikum <aeikum at codeweavers.com>
Date:   Tue Jan  5 13:38:21 2016 -0600

oleaut32: Don't clear BSTR size.

The size is used during cache lookup. Clearing it will break lookup
and prevent detection of double-freeing when warn+heap is enabled.

Signed-off-by: Andrew Eikum <aeikum at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/oleaut32/oleaut.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/dlls/oleaut32/oleaut.c b/dlls/oleaut32/oleaut.c
index 78cb083..214421c 100644
--- a/dlls/oleaut32/oleaut.c
+++ b/dlls/oleaut32/oleaut.c
@@ -277,7 +277,6 @@ void WINAPI SysFreeString(BSTR str)
 
             if(WARN_ON(heap)) {
                 unsigned n = bstr_alloc_size(bstr->size) / sizeof(DWORD) - 1;
-                bstr->size = ARENA_FREE_FILLER;
                 for(i=0; i<n; i++)
                     bstr->u.dwptr[i] = ARENA_FREE_FILLER;
             }




More information about the wine-cvs mailing list