[MOUNTMGR] Don't overrun output buffer in QueryPointsFromMemory
authorPierre Schweitzer <pierre@reactos.org>
Fri, 6 Sep 2019 06:30:18 +0000 (08:30 +0200)
committerPierre Schweitzer <pierre@reactos.org>
Fri, 6 Sep 2019 06:30:18 +0000 (08:30 +0200)
drivers/filters/mountmgr/point.c

index 77fc6fb..4c1d843 100644 (file)
@@ -342,6 +342,8 @@ QueryPointsFromMemory(IN PDEVICE_EXTENSION DeviceExtension,
 
     if (MountPoints->Size > Stack->Parameters.DeviceIoControl.OutputBufferLength)
     {
+        Irp->IoStatus.Information = sizeof(MOUNTMGR_MOUNT_POINTS);
+
         return STATUS_BUFFER_OVERFLOW;
     }