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