projects
/
reactos.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
add1be2
)
[SERVICES] Add a checks for vaild info level to RChangeServiceConfig2A/W and RQuerySe...
author
Eric Kohl
<eric.kohl@reactos.org>
Sun, 22 Jul 2018 10:45:23 +0000
(12:45 +0200)
committer
Eric Kohl
<eric.kohl@reactos.org>
Sun, 22 Jul 2018 10:45:23 +0000
(12:45 +0200)
CORE-14837
base/system/services/rpcserver.c
patch
|
blob
|
history
diff --git
a/base/system/services/rpcserver.c
b/base/system/services/rpcserver.c
index
0d75aae
..
2e6e808
100644
(file)
--- a/
base/system/services/rpcserver.c
+++ b/
base/system/services/rpcserver.c
@@
-5104,6
+5104,10
@@
RChangeServiceConfig2A(
DPRINT("RChangeServiceConfig2A() called\n");
DPRINT("dwInfoLevel = %lu\n", Info.dwInfoLevel);
DPRINT("RChangeServiceConfig2A() called\n");
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;
if (InfoW.dwInfoLevel == SERVICE_CONFIG_DESCRIPTION)
InfoW.dwInfoLevel = Info.dwInfoLevel;
if (InfoW.dwInfoLevel == SERVICE_CONFIG_DESCRIPTION)
@@
-5502,6
+5506,10
@@
RChangeServiceConfig2W(
if (ScmShutdown)
return ERROR_SHUTDOWN_IN_PROGRESS;
if (ScmShutdown)
return ERROR_SHUTDOWN_IN_PROGRESS;
+ if ((Info.dwInfoLevel < SERVICE_CONFIG_DESCRIPTION) ||
+ (Info.dwInfoLevel > SERVICE_CONFIG_FAILURE_ACTIONS))
+ return ERROR_INVALID_LEVEL;
+
hSvc = ScmGetServiceFromHandle(hService);
if (hSvc == NULL)
{
hSvc = ScmGetServiceFromHandle(hService);
if (hSvc == NULL)
{
@@
-5638,6
+5646,10
@@
RQueryServiceConfig2A(
if (ScmShutdown)
return ERROR_SHUTDOWN_IN_PROGRESS;
if (ScmShutdown)
return ERROR_SHUTDOWN_IN_PROGRESS;
+ if ((dwInfoLevel < SERVICE_CONFIG_DESCRIPTION) ||
+ (dwInfoLevel > SERVICE_CONFIG_FAILURE_ACTIONS))
+ return ERROR_INVALID_LEVEL;
+
hSvc = ScmGetServiceFromHandle(hService);
if (hSvc == NULL)
{
hSvc = ScmGetServiceFromHandle(hService);
if (hSvc == NULL)
{
@@
-5876,6
+5888,10
@@
RQueryServiceConfig2W(
if (ScmShutdown)
return ERROR_SHUTDOWN_IN_PROGRESS;
if (ScmShutdown)
return ERROR_SHUTDOWN_IN_PROGRESS;
+ if ((dwInfoLevel < SERVICE_CONFIG_DESCRIPTION) ||
+ (dwInfoLevel > SERVICE_CONFIG_FAILURE_ACTIONS))
+ return ERROR_INVALID_LEVEL;
+
hSvc = ScmGetServiceFromHandle(hService);
if (hSvc == NULL)
{
hSvc = ScmGetServiceFromHandle(hService);
if (hSvc == NULL)
{