From ad9fb647b43bada4b9ea70e90fe86a8e6099960e Mon Sep 17 00:00:00 2001 From: Paul Vriens Date: Fri, 20 Feb 2009 08:14:22 +0100 Subject: [PATCH] fusion/tests: Don't use strdup to prevent crashes when freeing memory. --- dlls/fusion/tests/asmenum.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dlls/fusion/tests/asmenum.c b/dlls/fusion/tests/asmenum.c index 14cf002dcf0..f3be262867d 100644 --- a/dlls/fusion/tests/asmenum.c +++ b/dlls/fusion/tests/asmenum.c @@ -253,7 +253,8 @@ static BOOL enum_gac_assemblies(struct list *assemblies, int depth, LPSTR path) lstrcatA(disp, buf); name = HeapAlloc(GetProcessHeap(), 0, sizeof(ASMNAME)); - name->data = strdup(disp); + name->data = HeapAlloc(GetProcessHeap(), 0, lstrlenA(disp) + 1); + lstrcpyA(name->data, disp); list_add_tail(assemblies, &name->entry); continue;