https://git.reactos.org/?p=reactos.git;a=commitdiff;h=d592e00dfa07277b2f27c4f50543c8caacdd1bce

commit d592e00dfa07277b2f27c4f50543c8caacdd1bce
Author:     Pierre Schweitzer <[email protected]>
AuthorDate: Thu Sep 5 08:28:56 2019 +0200
Commit:     Pierre Schweitzer <[email protected]>
CommitDate: Thu Sep 5 08:36:19 2019 +0200

    [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
---
 drivers/filters/mountmgr/point.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/filters/mountmgr/point.c b/drivers/filters/mountmgr/point.c
index d9a468f32c2..d63ec3a4592 100644
--- a/drivers/filters/mountmgr/point.c
+++ b/drivers/filters/mountmgr/point.c
@@ -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)
     {

Reply via email to