Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
b29157e1
Commit
b29157e1
authored
Feb 12, 2018
by
Andrew Eikum
Committed by
Alexandre Julliard
Feb 12, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
services: Fix reading past end of struct (Coverity).
Signed-off-by:
Andrew Eikum
<
aeikum@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
7bc327a1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
10 deletions
+9
-10
rpc.c
programs/services/rpc.c
+9
-10
No files found.
programs/services/rpc.c
View file @
b29157e1
...
...
@@ -821,6 +821,14 @@ DWORD __cdecl svcctl_ChangeServiceConfigW(
return
err
;
}
static
void
fill_status_process
(
SERVICE_STATUS_PROCESS
*
status
,
struct
service_entry
*
service
)
{
struct
process_entry
*
process
=
service
->
process
;
memcpy
(
status
,
&
service
->
status
,
sizeof
(
service
->
status
));
status
->
dwProcessId
=
process
?
process
->
process_id
:
0
;
status
->
dwServiceFlags
=
0
;
}
static
void
fill_notify
(
struct
sc_notify_handle
*
notify
)
{
SC_RPC_NOTIFY_PARAMS_LIST
*
list
;
...
...
@@ -834,8 +842,7 @@ static void fill_notify(struct sc_notify_handle *notify)
cparams
=
(
SERVICE_NOTIFY_STATUS_CHANGE_PARAMS_2
*
)(
list
+
1
);
cparams
->
dwNotifyMask
=
notify
->
notify_mask
;
memcpy
(
&
cparams
->
ServiceStatus
,
&
notify
->
service
->
service_entry
->
status
,
sizeof
(
SERVICE_STATUS_PROCESS
));
fill_status_process
(
&
cparams
->
ServiceStatus
,
notify
->
service
->
service_entry
);
cparams
->
dwNotificationStatus
=
ERROR_SUCCESS
;
cparams
->
dwNotificationTriggered
=
1
<<
(
cparams
->
ServiceStatus
.
dwCurrentState
-
SERVICE_STOPPED
);
cparams
->
pszServiceNames
=
NULL
;
...
...
@@ -1013,14 +1020,6 @@ DWORD __cdecl svcctl_QueryServiceConfig2W( SC_RPC_HANDLE hService, DWORD level,
return
err
;
}
static
void
fill_status_process
(
SERVICE_STATUS_PROCESS
*
status
,
struct
service_entry
*
service
)
{
struct
process_entry
*
process
=
service
->
process
;
memcpy
(
status
,
&
service
->
status
,
sizeof
(
service
->
status
));
status
->
dwProcessId
=
process
?
process
->
process_id
:
0
;
status
->
dwServiceFlags
=
0
;
}
DWORD
__cdecl
svcctl_QueryServiceStatusEx
(
SC_RPC_HANDLE
hService
,
SC_STATUS_TYPE
InfoLevel
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment