mirror of
https://github.com/reactos/reactos.git
synced 2025-01-04 21:38:43 +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:
|
||||
KdPrint(("floppy: IOCTL_DISK_CHECK_VERIFY called\n"));
|
||||
*((PULONG)OutputBuffer) = DriveInfo->DiskChangeCount;
|
||||
Irp->IoStatus.Status = STATUS_SUCCESS;
|
||||
Irp->IoStatus.Information = sizeof(ULONG);
|
||||
if (OutputLength != 0)
|
||||
{
|
||||
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;
|
||||
|
||||
case IOCTL_DISK_GET_DRIVE_GEOMETRY:
|
||||
|
|
Loading…
Reference in a new issue