[MOUNTMGR] Fix buffer length checking
authorPierre Schweitzer <pierre@reactos.org>
Thu, 3 Jan 2019 22:10:31 +0000 (23:10 +0100)
committerPierre Schweitzer <pierre@reactos.org>
Thu, 3 Jan 2019 22:12:16 +0000 (23:12 +0100)
Found by Vadim Galiant.

CORE-15549

drivers/filters/mountmgr/device.c

index 08b386d..17d720e 100644 (file)
@@ -265,7 +265,7 @@ MountMgrCreatePoint(IN PDEVICE_EXTENSION DeviceExtension,
 
     MaxLength = MAX((Point->DeviceNameOffset + Point->DeviceNameLength),
                     (Point->SymbolicLinkNameLength + Point->SymbolicLinkNameOffset));
-    if (MaxLength >= Stack->Parameters.DeviceIoControl.InputBufferLength)
+    if (MaxLength > Stack->Parameters.DeviceIoControl.InputBufferLength)
     {
         return STATUS_INVALID_PARAMETER;
     }