mirror of
https://github.com/reactos/reactos.git
synced 2025-07-23 17:54:08 +00:00
- Check for a valid buffer on a call to IOCTL_DISK_CHECK_VERIFY.
svn path=/trunk/; revision=10001
This commit is contained in:
parent
405e3b3822
commit
1b16d86ba8
1 changed files with 19 additions and 3 deletions
|
@ -210,9 +210,25 @@ VOID NTAPI DeviceIoctlPassive(PDRIVE_INFO DriveInfo,
|
||||||
|
|
||||||
case IOCTL_DISK_CHECK_VERIFY:
|
case IOCTL_DISK_CHECK_VERIFY:
|
||||||
KdPrint(("floppy: IOCTL_DISK_CHECK_VERIFY called\n"));
|
KdPrint(("floppy: IOCTL_DISK_CHECK_VERIFY called\n"));
|
||||||
*((PULONG)OutputBuffer) = DriveInfo->DiskChangeCount;
|
if (OutputLength != 0)
|
||||||
Irp->IoStatus.Status = STATUS_SUCCESS;
|
{
|
||||||
Irp->IoStatus.Information = sizeof(ULONG);
|
if (OutputLength < sizeof(ULONG))
|
||||||
|
{
|
||||||
|
Irp->IoStatus.Status = STATUS_BUFFER_TOO_SMALL;
|
||||||
|
Irp->IoStatus.Information = 0;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
*((PULONG)OutputBuffer) = DriveInfo->DiskChangeCount;
|
||||||
|
Irp->IoStatus.Status = STATUS_SUCCESS;
|
||||||
|
Irp->IoStatus.Information = sizeof(ULONG);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Irp->IoStatus.Status = STATUS_SUCCESS;
|
||||||
|
Irp->IoStatus.Information = 0;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case IOCTL_DISK_GET_DRIVE_GEOMETRY:
|
case IOCTL_DISK_GET_DRIVE_GEOMETRY:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue