[MOUNTMGR] Fix buffer length checking

Found by Vadim Galiant.

CORE-15549
This commit is contained in:
Pierre Schweitzer
2019-01-03 23:10:31 +01:00
parent 6d89d19f39
commit d84ab9ec7c

View 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;
}