mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 20:05:41 +00: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:
parent
70d29ec423
commit
d592e00dfa
1 changed files with 2 additions and 1 deletions
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue