[Bug 36060] Hawking control center driver install tool crashes during installation

wine-bugs at winehq.org wine-bugs at winehq.org
Sat Sep 5 07:08:07 CDT 2015


https://bugs.winehq.org/show_bug.cgi?id=36060

--- Comment #3 from super_man at post.com ---
I have a theory of the problem.

If it's not correct I at least have an hack to prevent it which could be real
fix too.

I think the problem could be here.

fixme:shell:SHRegCreateUSKeyW unsupported flags 0x00000004

Wine doesn't really do anything. 

http://source.winehq.org/git/wine.git/blob/253a587e471a653e1b5ed590280452f43679aa6d:/dlls/shlwapi/reg.c#l268

It returns success. 

And next the program wants to SHRegCloseUSKey key that was never created. 

To prevent the crash here I created NULL check.

---
 dlls/shlwapi/reg.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/dlls/shlwapi/reg.c b/dlls/shlwapi/reg.c
index 1653b80..3fbc9b8 100644
--- a/dlls/shlwapi/reg.c
+++ b/dlls/shlwapi/reg.c
@@ -193,6 +193,7 @@ LONG WINAPI SHRegCloseUSKey(
     LPSHUSKEY hKey = hUSKey;
     LONG ret = ERROR_SUCCESS;

+    if(hUSKey == NULL) return ret;
     if (hKey->HKCUkey)
         ret = RegCloseKey(hKey->HKCUkey);
     if (hKey->HKCUstart && hKey->HKCUstart != HKEY_CURRENT_USER)
-- 
1.9.1

And no more crash while installing.

-- 
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.



More information about the wine-bugs mailing list