mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 01:55:19 +00:00
Fix IRP_MJ_QUERY_INFORMATION/FileStandardInformation (current code was trying to dereference NULL pointer)
Replace MmGetSystemAddressForMdl by MmGetSystemAddressForMdlSafe svn path=/trunk/; revision=17514
This commit is contained in:
parent
66c8fe47e0
commit
6b3b47323d
3 changed files with 3 additions and 2 deletions
|
@ -31,7 +31,7 @@ SerialGetUserBuffers(
|
|||
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;
|
||||
|
|
|
@ -38,6 +38,7 @@ SerialQueryInformation(
|
|||
Status = STATUS_BUFFER_OVERFLOW;
|
||||
else if (!StandardInfo)
|
||||
Status = STATUS_INVALID_PARAMETER;
|
||||
else
|
||||
{
|
||||
StandardInfo->AllocationSize.QuadPart = 0;
|
||||
StandardInfo->EndOfFile.QuadPart = 0;
|
||||
|
|
|
@ -274,7 +274,7 @@ SerialPnpStartDevice(
|
|||
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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue