[MOUNTMGR] Properly validate input buffer size
[reactos.git] / drivers / filters / mountmgr / device.c
index 17d720e..7172a3b 100644 (file)
@@ -1745,7 +1745,7 @@ MountMgrQueryPoints(IN PDEVICE_EXTENSION DeviceExtension,
 
     /* We can't go beyond */
     if (((ULONG)MountPoint->SymbolicLinkNameLength + MountPoint->UniqueIdLength +
-        MountPoint->DeviceNameLength) < Stack->Parameters.DeviceIoControl.InputBufferLength)
+        MountPoint->DeviceNameLength) > Stack->Parameters.DeviceIoControl.InputBufferLength)
     {
         return STATUS_INVALID_PARAMETER;
     }