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
6df7e7b9
Commit
6df7e7b9
authored
Jun 30, 2010
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Append a terminating null and return the correct length in NtQuerySymbolicLinkObject.
parent
4c1f36cb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
12 deletions
+15
-12
om.c
dlls/ntdll/om.c
+15
-12
No files found.
dlls/ntdll/om.c
View file @
6df7e7b9
...
...
@@ -634,33 +634,36 @@ NTSTATUS WINAPI NtCreateSymbolicLinkObject(OUT PHANDLE SymbolicLinkHandle,IN ACC
* ZwQuerySymbolicLinkObject [NTDLL.@]
*
* Query a namespace symbolic link object target name.
*
*
* PARAMS
*
LinkH
andle [I] Handle to a symbolic link object
*
LinkT
arget [O] Destination for the symbolic link target
*
ReturnedLength
[O] Size of returned data
*
h
andle [I] Handle to a symbolic link object
*
t
arget [O] Destination for the symbolic link target
*
length
[O] Size of returned data
*
* RETURNS
* Success: ERROR_SUCCESS.
* Failure: An NTSTATUS error code.
*/
NTSTATUS
WINAPI
NtQuerySymbolicLinkObject
(
IN
HANDLE
LinkHandle
,
IN
OUT
PUNICODE_STRING
LinkTarget
,
OUT
PULONG
ReturnedLength
OPTIONAL
)
NTSTATUS
WINAPI
NtQuerySymbolicLinkObject
(
HANDLE
handle
,
PUNICODE_STRING
target
,
PULONG
length
)
{
NTSTATUS
ret
;
TRACE
(
"(%p,%p,%p)
\n
"
,
LinkHandle
,
LinkTarget
,
ReturnedLength
);
if
(
!
LinkTarget
)
return
STATUS_ACCESS_VIOLATION
;
TRACE
(
"(%p,%p,%p)
\n
"
,
handle
,
target
,
length
);
if
(
!
target
)
return
STATUS_ACCESS_VIOLATION
;
SERVER_START_REQ
(
query_symlink
)
{
req
->
handle
=
wine_server_obj_handle
(
LinkHandle
);
wine_server_set_reply
(
req
,
LinkTarget
->
Buffer
,
LinkTarget
->
MaximumLength
);
req
->
handle
=
wine_server_obj_handle
(
handle
);
if
(
target
->
MaximumLength
>=
sizeof
(
WCHAR
))
wine_server_set_reply
(
req
,
target
->
Buffer
,
target
->
MaximumLength
-
sizeof
(
WCHAR
)
);
if
(
!
(
ret
=
wine_server_call
(
req
)))
{
LinkTarget
->
Length
=
wine_server_reply_size
(
reply
);
if
(
ReturnedLength
)
*
ReturnedLength
=
LinkTarget
->
Length
;
target
->
Length
=
wine_server_reply_size
(
reply
);
target
->
Buffer
[
target
->
Length
/
sizeof
(
WCHAR
)]
=
0
;
if
(
length
)
*
length
=
reply
->
total
+
sizeof
(
WCHAR
);
}
else
if
(
length
&&
ret
==
STATUS_BUFFER_TOO_SMALL
)
*
length
=
reply
->
total
+
sizeof
(
WCHAR
);
}
SERVER_END_REQ
;
return
ret
;
...
...
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