Commit 2e67fa32 authored by Rolf Kalbermatter's avatar Rolf Kalbermatter Committed by Alexandre Julliard

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

parent 5f1a2347
......@@ -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)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment