Replace MmGetSystemAddressForMdl by MmGetSystemAddressForMdlSafe
svn path=/trunk/; revision=17514
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;
Status = STATUS_BUFFER_OVERFLOW;
else if (!StandardInfo)
Status = STATUS_INVALID_PARAMETER;
+ else
{
StandardInfo->AllocationSize.QuadPart = 0;
StandardInfo->EndOfFile.QuadPart = 0;
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);
}