Uninstaller crashed on Windows 2000

Pavel Roskin proski at gnu.org
Wed Sep 24 14:07:01 CDT 2003


Hello!

HeapReAlloc() would crash on Windows 2000 is the original pointer is NULL.
This causes the Andreas Mohr's uninstaller to crash.

ChangeLog:
	programs/uninstaller/main.c
	Call HeapAlloc() on entries before HeapReAlloc() to avoid crash
	on Windows 2000.

-- 
Regards,
Pavel Roskin
-------------- next part --------------
--- programs/uninstaller/main.c
+++ programs/uninstaller/main.c
@@ -203,6 +203,9 @@ int FetchUninstallInformation(void)
 	return 0;
     }
 
+    if (!entries)
+	entries = HeapAlloc(GetProcessHeap(), 0, sizeof(uninst_entry));
+
     strcpy(key_app, REGSTR_PATH_UNINSTALL);
     strcat(key_app, "\\");
     p = key_app+strlen(REGSTR_PATH_UNINSTALL)+1;


More information about the wine-patches mailing list