mirror of
https://github.com/reactos/reactos.git
synced 2025-04-28 01:11:35 +00:00
[MOUNTMGR] Fix QueryPointsFromSymbolicLinkName and make it working
Select the current stack location for output buffer And set output size so that buffer gets properly copied to caller
This commit is contained in:
parent
16ec2e2aa5
commit
26a31b160a
1 changed files with 4 additions and 1 deletions
|
@ -518,7 +518,7 @@ QueryPointsFromSymbolicLinkName(IN PDEVICE_EXTENSION DeviceExtension,
|
|||
}
|
||||
|
||||
/* Get output buffer */
|
||||
Stack = IoGetNextIrpStackLocation(Irp);
|
||||
Stack = IoGetCurrentIrpStackLocation(Irp);
|
||||
MountPoints = (PMOUNTMGR_MOUNT_POINTS)Irp->AssociatedIrp.SystemBuffer;
|
||||
|
||||
/* Compute output length */
|
||||
|
@ -528,9 +528,12 @@ QueryPointsFromSymbolicLinkName(IN PDEVICE_EXTENSION DeviceExtension,
|
|||
/* Give length to allow reallocation */
|
||||
MountPoints->Size = sizeof(MOUNTMGR_MOUNT_POINTS) + TotalLength;
|
||||
MountPoints->NumberOfMountPoints = 1;
|
||||
Irp->IoStatus.Information = sizeof(MOUNTMGR_MOUNT_POINTS) + TotalLength;
|
||||
|
||||
if (MountPoints->Size > Stack->Parameters.DeviceIoControl.OutputBufferLength)
|
||||
{
|
||||
Irp->IoStatus.Information = sizeof(MOUNTMGR_MOUNT_POINTS);
|
||||
|
||||
return STATUS_BUFFER_OVERFLOW;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue