mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 22:33:00 +00:00
[SERVICES] Add a checks for vaild info level to RChangeServiceConfig2A/W and RQueryServiceConfig2A/W
CORE-14837
This commit is contained in:
parent
add1be24a7
commit
91a5ee334d
1 changed files with 16 additions and 0 deletions
|
@ -5104,6 +5104,10 @@ RChangeServiceConfig2A(
|
||||||
DPRINT("RChangeServiceConfig2A() called\n");
|
DPRINT("RChangeServiceConfig2A() called\n");
|
||||||
DPRINT("dwInfoLevel = %lu\n", Info.dwInfoLevel);
|
DPRINT("dwInfoLevel = %lu\n", Info.dwInfoLevel);
|
||||||
|
|
||||||
|
if ((Info.dwInfoLevel < SERVICE_CONFIG_DESCRIPTION) ||
|
||||||
|
(Info.dwInfoLevel > SERVICE_CONFIG_FAILURE_ACTIONS))
|
||||||
|
return ERROR_INVALID_LEVEL;
|
||||||
|
|
||||||
InfoW.dwInfoLevel = Info.dwInfoLevel;
|
InfoW.dwInfoLevel = Info.dwInfoLevel;
|
||||||
|
|
||||||
if (InfoW.dwInfoLevel == SERVICE_CONFIG_DESCRIPTION)
|
if (InfoW.dwInfoLevel == SERVICE_CONFIG_DESCRIPTION)
|
||||||
|
@ -5502,6 +5506,10 @@ RChangeServiceConfig2W(
|
||||||
if (ScmShutdown)
|
if (ScmShutdown)
|
||||||
return ERROR_SHUTDOWN_IN_PROGRESS;
|
return ERROR_SHUTDOWN_IN_PROGRESS;
|
||||||
|
|
||||||
|
if ((Info.dwInfoLevel < SERVICE_CONFIG_DESCRIPTION) ||
|
||||||
|
(Info.dwInfoLevel > SERVICE_CONFIG_FAILURE_ACTIONS))
|
||||||
|
return ERROR_INVALID_LEVEL;
|
||||||
|
|
||||||
hSvc = ScmGetServiceFromHandle(hService);
|
hSvc = ScmGetServiceFromHandle(hService);
|
||||||
if (hSvc == NULL)
|
if (hSvc == NULL)
|
||||||
{
|
{
|
||||||
|
@ -5638,6 +5646,10 @@ RQueryServiceConfig2A(
|
||||||
if (ScmShutdown)
|
if (ScmShutdown)
|
||||||
return ERROR_SHUTDOWN_IN_PROGRESS;
|
return ERROR_SHUTDOWN_IN_PROGRESS;
|
||||||
|
|
||||||
|
if ((dwInfoLevel < SERVICE_CONFIG_DESCRIPTION) ||
|
||||||
|
(dwInfoLevel > SERVICE_CONFIG_FAILURE_ACTIONS))
|
||||||
|
return ERROR_INVALID_LEVEL;
|
||||||
|
|
||||||
hSvc = ScmGetServiceFromHandle(hService);
|
hSvc = ScmGetServiceFromHandle(hService);
|
||||||
if (hSvc == NULL)
|
if (hSvc == NULL)
|
||||||
{
|
{
|
||||||
|
@ -5876,6 +5888,10 @@ RQueryServiceConfig2W(
|
||||||
if (ScmShutdown)
|
if (ScmShutdown)
|
||||||
return ERROR_SHUTDOWN_IN_PROGRESS;
|
return ERROR_SHUTDOWN_IN_PROGRESS;
|
||||||
|
|
||||||
|
if ((dwInfoLevel < SERVICE_CONFIG_DESCRIPTION) ||
|
||||||
|
(dwInfoLevel > SERVICE_CONFIG_FAILURE_ACTIONS))
|
||||||
|
return ERROR_INVALID_LEVEL;
|
||||||
|
|
||||||
hSvc = ScmGetServiceFromHandle(hService);
|
hSvc = ScmGetServiceFromHandle(hService);
|
||||||
if (hSvc == NULL)
|
if (hSvc == NULL)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue