Module: wine Branch: master Commit: ad9fb647b43bada4b9ea70e90fe86a8e6099960e URL: http://source.winehq.org/git/wine.git/?a=commit;h=ad9fb647b43bada4b9ea70e90f...
Author: Paul Vriens Paul.Vriens.Wine@gmail.com Date: Fri Feb 20 08:14:22 2009 +0100
fusion/tests: Don't use strdup to prevent crashes when freeing memory.
---
dlls/fusion/tests/asmenum.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/dlls/fusion/tests/asmenum.c b/dlls/fusion/tests/asmenum.c index 14cf002..f3be262 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;