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
dc665388
Commit
dc665388
authored
Jul 26, 2007
by
Paul Vriens
Committed by
Alexandre Julliard
Jul 27, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
advapi32/service: Fix buffersize calculations for GetServiceDisplayNameW.
parent
95d2f046
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
3 deletions
+4
-3
service.c
dlls/advapi32/service.c
+4
-0
service.c
dlls/advapi32/tests/service.c
+0
-3
No files found.
dlls/advapi32/service.c
View file @
dc665388
...
...
@@ -2356,6 +2356,10 @@ BOOL WINAPI GetServiceDisplayNameW( SC_HANDLE hSCManager, LPCWSTR lpServiceName,
SetLastError
(
ret
);
return
FALSE
;
}
/* Always return the correct needed size on success */
*
lpcchBuffer
=
(
size
/
sizeof
(
WCHAR
))
-
1
;
return
TRUE
;
}
...
...
dlls/advapi32/tests/service.c
View file @
dc665388
...
...
@@ -527,12 +527,9 @@ static void test_get_displayname(void)
GetLastError
()
==
ERROR_IO_PENDING
/* W2K */
||
GetLastError
()
==
0xdeadbeef
/* NT4, XP, Vista */
,
"Expected ERROR_SUCCESS, ERROR_IO_PENDING or 0xdeadbeef, got %d
\n
"
,
GetLastError
());
todo_wine
{
ok
(
displaysize
==
tempsizeW
,
"Expected the needed buffersize
\n
"
);
ok
(
lstrlenW
(
displaynameW
)
==
displaysize
,
"Expected the buffer to be the length of the string
\n
"
)
;
}
ok
(
tempsize
/
2
==
tempsizeW
,
"Expected the needed buffersize (in bytes) to be the same for the A and W call
\n
"
);
...
...
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