Error path issues with "gameux: Add implementation of IGameStatisticsMgr::RemoveGameStatistics."

Joris Huizer joris_huizer at
Wed Sep 29 10:15:17 CDT 2010


I noticed the committed patch "gameux: Add implementation of IGameStatisticsMgr::RemoveGameStatistics." (5cac9d2cb2c020802a56a5b1b28348316f1087ba)

The GAMEUX_getAppIdFromGDFPath() function now ends with:

+    HeapFree(GetProcessHeap(), 0, lpRegistryPath);
+    TRACE("found app id: %s, return: %#x\n", debugstr_w(lpApplicationId), hr);
+    return hr;

In most of the error paths, lpRegistryPath is not initialized, so it's pointing to garbage; I think just initializing to NULL should be sufficient;

Similarly, in that case, lpApplicationId is not initialized, so it contains garbage; Tracing will probably print some random stack bytes before hitting a zero byte.
I'm not completely sure what should be done about this issue; I think it should probably only be traced on success, perhaps tracing the error otherwise; Any ideas?



More information about the wine-devel mailing list