mirror of
https://github.com/reactos/reactos.git
synced 2026-05-31 08:17:09 +08:00
[MOUNTMGR] Fix QueryPointsFromMemory 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:
@@ -332,12 +332,13 @@ QueryPointsFromMemory(IN PDEVICE_EXTENSION DeviceExtension,
|
||||
}
|
||||
|
||||
/* Now, ensure output buffer can hold everything */
|
||||
Stack = IoGetNextIrpStackLocation(Irp);
|
||||
Stack = IoGetCurrentIrpStackLocation(Irp);
|
||||
MountPoints = (PMOUNTMGR_MOUNT_POINTS)Irp->AssociatedIrp.SystemBuffer;
|
||||
|
||||
/* Ensure we set output to let user reallocate! */
|
||||
MountPoints->Size = sizeof(MOUNTMGR_MOUNT_POINTS) + TotalSize;
|
||||
MountPoints->NumberOfMountPoints = TotalSymLinks;
|
||||
Irp->IoStatus.Information = sizeof(MOUNTMGR_MOUNT_POINTS) + TotalSize;
|
||||
|
||||
if (MountPoints->Size > Stack->Parameters.DeviceIoControl.OutputBufferLength)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user