[PATCH 0/1] MR6176: sechost: Check both lpServiceName and lpServiceProc for NULL in StartServiceCtrlDispatcher().
An application I'm working on calls StartServiceCtrlDispatcher() with only lpServiceProc set to NULL in last element. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/6176
From: Dmitry Timoshkov <dmitry(a)baikal.ru> Signed-off-by: Dmitry Timoshkov <dmitry(a)baikal.ru> --- dlls/sechost/service.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/dlls/sechost/service.c b/dlls/sechost/service.c index 446031e4043..915b0b4ebe0 100644 --- a/dlls/sechost/service.c +++ b/dlls/sechost/service.c @@ -1910,7 +1910,8 @@ BOOL WINAPI DECLSPEC_HOTPATCH StartServiceCtrlDispatcherA( const SERVICE_TABLE_E SetLastError( ERROR_SERVICE_ALREADY_RUNNING ); return FALSE; } - while (servent[nb_services].lpServiceName) nb_services++; + while (servent[nb_services].lpServiceName && servent[nb_services].lpServiceProc) + nb_services++; if (!nb_services) { SetLastError( ERROR_INVALID_PARAMETER ); @@ -1948,7 +1949,8 @@ BOOL WINAPI DECLSPEC_HOTPATCH StartServiceCtrlDispatcherW( const SERVICE_TABLE_E SetLastError( ERROR_SERVICE_ALREADY_RUNNING ); return FALSE; } - while (servent[nb_services].lpServiceName) nb_services++; + while (servent[nb_services].lpServiceName && servent[nb_services].lpServiceProc) + nb_services++; if (!nb_services) { SetLastError( ERROR_INVALID_PARAMETER ); -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/6176
Hi, It looks like your patch introduced the new failures shown below. Please investigate and fix them before resubmitting your patch. If they are not new, fixing them anyway would help a lot. Otherwise please ask for the known failures list to be updated. The tests also ran into some preexisting test failures. If you know how to fix them that would be helpful. See the TestBot job for the details: The full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=147435 Your paranoid android. === debian11 (build log) === error: patch failed: dlls/sechost/service.c:1910 Task: Patch failed to apply
participants (3)
-
Dmitry Timoshkov -
Dmitry Timoshkov (@dmitry) -
Marvin