mountmgr: Fix buffer length check.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49305
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
feature/deterministic
Hans Leidekker 2020-06-04 16:13:12 +02:00 committed by Alexandre Julliard
parent d48fed09e5
commit ea9b507380
1 changed files with 1 additions and 1 deletions

View File

@ -1780,7 +1780,7 @@ static void query_property( struct disk_device *device, IRP *irp )
if (!irp->UserBuffer
|| irpsp->Parameters.DeviceIoControl.OutputBufferLength < sizeof(STORAGE_DESCRIPTOR_HEADER))
irp->IoStatus.u.Status = STATUS_INVALID_PARAMETER;
else if (irpsp->Parameters.DeviceIoControl.OutputBufferLength < sizeof(STORAGE_DEVICE_DESCRIPTOR))
else if (irpsp->Parameters.DeviceIoControl.OutputBufferLength < len)
{
descriptor = irp->UserBuffer;
descriptor->Version = sizeof(STORAGE_DEVICE_DESCRIPTOR);