forked from Mirrors/wine-wine
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
parent
d48fed09e5
commit
ea9b507380
|
@ -1780,7 +1780,7 @@ static void query_property( struct disk_device *device, IRP *irp )
|
||||||
if (!irp->UserBuffer
|
if (!irp->UserBuffer
|
||||||
|| irpsp->Parameters.DeviceIoControl.OutputBufferLength < sizeof(STORAGE_DESCRIPTOR_HEADER))
|
|| irpsp->Parameters.DeviceIoControl.OutputBufferLength < sizeof(STORAGE_DESCRIPTOR_HEADER))
|
||||||
irp->IoStatus.u.Status = STATUS_INVALID_PARAMETER;
|
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 = irp->UserBuffer;
|
||||||
descriptor->Version = sizeof(STORAGE_DEVICE_DESCRIPTOR);
|
descriptor->Version = sizeof(STORAGE_DEVICE_DESCRIPTOR);
|
||||||
|
|
Loading…
Reference in New Issue