[PATCH 0/1] MR316: wbemprox: Use return length from NtQuerySystemInformationEx().
The return length is unlikely to change between the two NtQuerySystemInformationEx calls, but it's possible, and it's more correct to parse the entries with the length from the call where the data was returned. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/316
From: Brendan Shanks <bshanks(a)codeweavers.com> --- dlls/wbemprox/builtin.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/wbemprox/builtin.c b/dlls/wbemprox/builtin.c index 725f3816ad9..4ac52918f6f 100644 --- a/dlls/wbemprox/builtin.c +++ b/dlls/wbemprox/builtin.c @@ -1533,7 +1533,7 @@ static UINT get_logical_processor_count( UINT *num_physical, UINT *num_packages if (status != STATUS_INFO_LENGTH_MISMATCH) return get_processor_count(); if (!(buf = malloc( len ))) return get_processor_count(); - status = NtQuerySystemInformationEx( SystemLogicalProcessorInformationEx, &all, sizeof(all), buf, len, NULL ); + status = NtQuerySystemInformationEx( SystemLogicalProcessorInformationEx, &all, sizeof(all), buf, len, &len ); if (status != STATUS_SUCCESS) { free( buf ); -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/316
This merge request was approved by Hans Leidekker. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/316
participants (3)
-
Brendan Shanks -
Brendan Shanks (@bshanks) -
Hans Leidekker (@hans)