Error path issues with "gameux: Add implementation of IGameStatisticsMgr::RemoveGameStatistics."
vshader at gmail.com
Thu Sep 30 10:11:26 CDT 2010
W dniu 29.09.2010 17:15, Joris Huizer pisze:
> I noticed the committed patch "gameux: Add implementation of
> 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
> 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?
> HTH, Joris
I'm author of this patch.
You're definitely right, I moved code of this function from other place,
and forgot to initialize these variables properly. I'll fix that by
initializing these variables (I do not want to make TRACE conditional,
as it prints HRESULT value too). Anyway, thanks for your notification.
More information about the wine-devel