mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 01:55:19 +00:00
Fixed bugs in NtQuerySymbolicLinkObject():
- fixed returned length and status svn path=/trunk/; revision=5966
This commit is contained in:
parent
1aace81264
commit
c9313c9b83
1 changed files with 16 additions and 6 deletions
|
@ -1,4 +1,4 @@
|
|||
/* $Id: symlink.c,v 1.2 2003/06/07 12:23:14 chorns Exp $
|
||||
/* $Id: symlink.c,v 1.3 2003/09/03 15:12:16 ekohl Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -323,18 +323,28 @@ NtQuerySymbolicLinkObject(IN HANDLE LinkHandle,
|
|||
NULL);
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
return(Status);
|
||||
return Status;
|
||||
}
|
||||
|
||||
RtlCopyUnicodeString(LinkTarget,
|
||||
SymlinkObject->Target.ObjectName);
|
||||
if (ReturnedLength != NULL)
|
||||
{
|
||||
*ReturnedLength = SymlinkObject->Target.Length;
|
||||
*ReturnedLength = (ULONG)SymlinkObject->TargetName.Length + sizeof(WCHAR);
|
||||
}
|
||||
|
||||
if (LinkTarget->MaximumLength >= SymlinkObject->TargetName.Length + sizeof(WCHAR))
|
||||
{
|
||||
RtlCopyUnicodeString(LinkTarget,
|
||||
&SymlinkObject->TargetName);
|
||||
Status = STATUS_SUCCESS;
|
||||
}
|
||||
else
|
||||
{
|
||||
Status = STATUS_BUFFER_TOO_SMALL;
|
||||
}
|
||||
|
||||
ObDereferenceObject(SymlinkObject);
|
||||
|
||||
return(STATUS_SUCCESS);
|
||||
return Status;
|
||||
}
|
||||
|
||||
/* EOF */
|
||||
|
|
Loading…
Reference in a new issue