Commit in reactos/drivers/storage/floppy on MAIN
ioctl.c+19-31.2 -> 1.3
- Check for a valid buffer on a call to IOCTL_DISK_CHECK_VERIFY.

reactos/drivers/storage/floppy
ioctl.c 1.2 -> 1.3
diff -u -r1.2 -r1.3
--- ioctl.c	12 Mar 2004 03:36:32 -0000	1.2
+++ ioctl.c	5 Jul 2004 21:44:27 -0000	1.3
@@ -210,9 +210,25 @@
 
     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:
CVSspam 0.2.8