symlink: bug fix for garbage characters in reparse path
Signed-off-by: Casey Bodley <cbodley@citi.umich.edu>
This commit is contained in:
parent
4bc7853cd6
commit
f8d92d5894
1 changed files with 4 additions and 1 deletions
|
|
@ -2652,8 +2652,9 @@ NTSTATUS nfs41_Create(
|
|||
|
||||
/* allocate the string for RxPrepareToReparseSymbolicLink(), and
|
||||
* format an absolute path "DeviceName+VNetRootName+symlink" */
|
||||
AbsPath.MaximumLength = AbsPath.Length = DeviceObject->DeviceName.Length +
|
||||
AbsPath.Length = DeviceObject->DeviceName.Length +
|
||||
VNetRootPrefix->Length + entry->u.Open.symlink.Length;
|
||||
AbsPath.MaximumLength = AbsPath.Length + sizeof(UNICODE_NULL);
|
||||
AbsPath.Buffer = RxAllocatePoolWithTag(NonPagedPool,
|
||||
AbsPath.MaximumLength, NFS41_MM_POOLTAG);
|
||||
if (AbsPath.Buffer == NULL) {
|
||||
|
|
@ -2667,6 +2668,8 @@ NTSTATUS nfs41_Create(
|
|||
RtlCopyMemory(buf, VNetRootPrefix->Buffer, VNetRootPrefix->Length);
|
||||
buf += VNetRootPrefix->Length;
|
||||
RtlCopyMemory(buf, entry->u.Open.symlink.Buffer, entry->u.Open.symlink.Length);
|
||||
buf += entry->u.Open.symlink.Length;
|
||||
*(PWCHAR)buf = UNICODE_NULL;
|
||||
|
||||
status = RxPrepareToReparseSymbolicLink(RxContext,
|
||||
entry->u.Open.symlink_embedded, &AbsPath, TRUE, &ReparseRequired);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue