Fix IRP_MJ_QUERY_INFORMATION/FileStandardInformation (current code was trying to dereference NULL pointer)
Replace MmGetSystemAddressForMdl by MmGetSystemAddressForMdlSafe
Modified: trunk/reactos/drivers/dd/serial/devctrl.c
Modified: trunk/reactos/drivers/dd/serial/info.c
Modified: trunk/reactos/drivers/dd/serial/pnp.c

Modified: trunk/reactos/drivers/dd/serial/devctrl.c
--- trunk/reactos/drivers/dd/serial/devctrl.c	2005-08-24 15:33:58 UTC (rev 17513)
+++ trunk/reactos/drivers/dd/serial/devctrl.c	2005-08-24 15:37:04 UTC (rev 17514)
@@ -31,7 +31,7 @@
 		case METHOD_IN_DIRECT:
 		case METHOD_OUT_DIRECT:
 			*BufferIn = Irp->AssociatedIrp.SystemBuffer;
-			*BufferOut = MmGetSystemAddressForMdl(Irp->MdlAddress);
+			*BufferOut = MmGetSystemAddressForMdlSafe(Irp->MdlAddress, NormalPagePriority);
 			break;
 		case METHOD_NEITHER:
 			*BufferIn = IoGetCurrentIrpStackLocation(Irp)->Parameters.DeviceIoControl.Type3InputBuffer;

Modified: trunk/reactos/drivers/dd/serial/info.c
--- trunk/reactos/drivers/dd/serial/info.c	2005-08-24 15:33:58 UTC (rev 17513)
+++ trunk/reactos/drivers/dd/serial/info.c	2005-08-24 15:37:04 UTC (rev 17514)
@@ -38,6 +38,7 @@
 				Status = STATUS_BUFFER_OVERFLOW;
 			else if (!StandardInfo)
 				Status = STATUS_INVALID_PARAMETER;
+			else
 			{
 				StandardInfo->AllocationSize.QuadPart = 0;
 				StandardInfo->EndOfFile.QuadPart = 0;

Modified: trunk/reactos/drivers/dd/serial/pnp.c
--- trunk/reactos/drivers/dd/serial/pnp.c	2005-08-24 15:33:58 UTC (rev 17513)
+++ trunk/reactos/drivers/dd/serial/pnp.c	2005-08-24 15:37:04 UTC (rev 17514)
@@ -274,7 +274,7 @@
 	if (NT_SUCCESS(Status))
 	{
 		/* Key = \Device\Serialx, Value = COMx */
-		ZwSetValueKey(hKey, &DeviceName, 0, REG_SZ, &ComPortBuffer, ComPort.Length + sizeof(WCHAR));
+		ZwSetValueKey(hKey, &DeviceName, 0, REG_SZ, ComPortBuffer, ComPort.Length + sizeof(WCHAR));
 		ZwClose(hKey);
 	}