[PATCH 0/1] MR11061: hnetcfg: Report 0 returned elements from IEnumVARIANT::Next.
A regression from !10957. MSDN documents that the final argument should be set to the number of returned elements, even if the function returns S_FALSE. steamservice.exe crashes on launch without this; it passes an uninitialized variable as pCeltFetched, so it proceeds to loop over some arbitrary number of (nonexistent) variants. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/11061
From: Tim Clem <tclem@codeweavers.com> --- dlls/hnetcfg/policy.c | 1 + 1 file changed, 1 insertion(+) diff --git a/dlls/hnetcfg/policy.c b/dlls/hnetcfg/policy.c index 88de6ed5404..b5306e84c53 100644 --- a/dlls/hnetcfg/policy.c +++ b/dlls/hnetcfg/policy.c @@ -841,6 +841,7 @@ static HRESULT WINAPI enumvar_Next(IEnumVARIANT *iface, ULONG celt, VARIANT *var { FIXME("%p,%lu,%p,%p\n", iface, celt, var, fetched); + if (fetched) *fetched = 0; return S_FALSE; } -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/11061
This merge request was approved by Alistair Leslie-Hughes. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/11061
participants (3)
-
Alistair Leslie-Hughes (@alesliehughes) -
Tim Clem -
Tim Clem (@tclem)