Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
fd0bec1f
Commit
fd0bec1f
authored
Dec 20, 2010
by
Damian Dixon
Committed by
Alexandre Julliard
Dec 21, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
advapi32: Added check for NULL pointer being passed to QueryServiceStatus for either parameter.
parent
a2d1c7df
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
1 deletion
+11
-1
service.c
dlls/advapi32/service.c
+11
-0
service.c
dlls/advapi32/tests/service.c
+0
-1
No files found.
dlls/advapi32/service.c
View file @
fd0bec1f
...
@@ -1130,6 +1130,17 @@ BOOL WINAPI QueryServiceStatus(SC_HANDLE hService,
...
@@ -1130,6 +1130,17 @@ BOOL WINAPI QueryServiceStatus(SC_HANDLE hService,
TRACE
(
"%p %p
\n
"
,
hService
,
lpservicestatus
);
TRACE
(
"%p %p
\n
"
,
hService
,
lpservicestatus
);
if
(
!
hService
)
{
SetLastError
(
ERROR_INVALID_HANDLE
);
return
FALSE
;
}
if
(
!
lpservicestatus
)
{
SetLastError
(
ERROR_INVALID_ADDRESS
);
return
FALSE
;
}
ret
=
QueryServiceStatusEx
(
hService
,
SC_STATUS_PROCESS_INFO
,
(
LPBYTE
)
&
SvcStatusData
,
ret
=
QueryServiceStatusEx
(
hService
,
SC_STATUS_PROCESS_INFO
,
(
LPBYTE
)
&
SvcStatusData
,
sizeof
(
SERVICE_STATUS_PROCESS
),
&
dummy
);
sizeof
(
SERVICE_STATUS_PROCESS
),
&
dummy
);
if
(
ret
)
memcpy
(
lpservicestatus
,
&
SvcStatusData
,
sizeof
(
SERVICE_STATUS
))
;
if
(
ret
)
memcpy
(
lpservicestatus
,
&
SvcStatusData
,
sizeof
(
SERVICE_STATUS
))
;
...
...
dlls/advapi32/tests/service.c
View file @
fd0bec1f
...
@@ -925,7 +925,6 @@ static void test_query_svc(void)
...
@@ -925,7 +925,6 @@ static void test_query_svc(void)
SetLastError
(
0xdeadbeef
);
SetLastError
(
0xdeadbeef
);
ret
=
QueryServiceStatus
(
svc_handle
,
NULL
);
ret
=
QueryServiceStatus
(
svc_handle
,
NULL
);
ok
(
!
ret
,
"Expected failure
\n
"
);
ok
(
!
ret
,
"Expected failure
\n
"
);
todo_wine
ok
(
GetLastError
()
==
ERROR_INVALID_ADDRESS
||
ok
(
GetLastError
()
==
ERROR_INVALID_ADDRESS
||
GetLastError
()
==
ERROR_INVALID_PARAMETER
/* NT4 */
,
GetLastError
()
==
ERROR_INVALID_PARAMETER
/* NT4 */
,
"Unexpected last error %d
\n
"
,
GetLastError
());
"Unexpected last error %d
\n
"
,
GetLastError
());
...
...
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