advapi32: Return error on NULL service name to GetServiceDisplayNameA/W.

This commit is contained in:
Rolf Kalbermatter 2007-05-20 22:36:51 +02:00 committed by Alexandre Julliard
parent 5f1a234731
commit 2e67fa32b1
1 changed files with 12 additions and 0 deletions

View File

@ -2069,6 +2069,12 @@ BOOL WINAPI GetServiceDisplayNameA( SC_HANDLE hSCManager, LPCSTR lpServiceName,
TRACE("%p %s %p %p\n", hSCManager,
debugstr_a(lpServiceName), lpDisplayName, lpcchBuffer);
if (!lpServiceName)
{
SetLastError(ERROR_INVALID_PARAMETER);
return FALSE;
}
hscm = sc_handle_get_handle_data(hSCManager, SC_HTYPE_MANAGER);
if (!hscm)
{
@ -2110,6 +2116,12 @@ BOOL WINAPI GetServiceDisplayNameW( SC_HANDLE hSCManager, LPCWSTR lpServiceName,
TRACE("%p %s %p %p\n", hSCManager,
debugstr_w(lpServiceName), lpDisplayName, lpcchBuffer);
if (!lpServiceName)
{
SetLastError(ERROR_INVALID_PARAMETER);
return FALSE;
}
hscm = sc_handle_get_handle_data(hSCManager, SC_HTYPE_MANAGER);
if (!hscm)
{