[msi] Is there a potential problem with squash_guid in msi/registry.c ?

Paul Vriens paul.vriens.wine at gmail.com
Sat Jul 28 14:30:21 CDT 2007


I'm still looking into the fact why the msi.c tests fails for me (and succeeds 
when running with WINEDEBUG=+msi).

A trace (+msi,+reg,+ole) revealed:

trace:msi:MsiQueryProductStateW L"A938G02JF-2NF3N93-VN3-2NNF-3KGKALDNF93"
trace:msi:MSIREG_OpenUserProductsKey L"A938G02JF-2NF3N93-VN3-2NNF-3KGKALDNF93"
trace:reg:NtOpenKey <- (nil)
warn:ole:CLSIDFromProgID couldn't open key for ProgID 
trace:msi:squash_guid Returning FALSE
trace:msi:MSIREG_OpenUserProductsKey squished 

(the 'Returning FALSE' is my doing).

The squished_pc variable in MSIREG_OpenUserProductsKey is filled with garbage.

I think that we should patch msi/registry.c:

diff --git a/dlls/msi/registry.c b/dlls/msi/registry.c
index b9c0af4..24a3def 100644
--- a/dlls/msi/registry.c
+++ b/dlls/msi/registry.c
@@ -233,6 +233,8 @@ BOOL squash_guid(LPCWSTR in, LPWSTR out)
      DWORD i,n=1;
      GUID guid;

+    out[0] = 0;
      if (FAILED(CLSIDFromString((LPOLESTR)in, &guid)))
          return FALSE;

So 'out' is always clean at the start. Adding this patch makes the test fail 
consistently :-). So it's not the fix.

Any comments/remarks/suggestions ?



More information about the wine-devel mailing list