ntoskrnl.exe: Initialize some IRP fields to prevent using bad pointers by IofCompleteRequest.

This commit is contained in:
Alexander Morozov 2008-10-16 12:06:23 +04:00 committed by Alexandre Julliard
parent c47d0715ab
commit e99451561d
1 changed files with 2 additions and 0 deletions

View File

@ -153,6 +153,7 @@ static NTSTATUS process_ioctl( DEVICE_OBJECT *device, ULONG code, void *in_buff,
irp.UserBuffer = out_buff;
irp.MdlAddress = &mdl;
irp.Tail.Overlay.s.u.CurrentStackLocation = &irpsp;
irp.UserIosb = NULL;
irpsp.MajorFunction = IRP_MJ_DEVICE_CONTROL;
irpsp.Parameters.DeviceIoControl.OutputBufferLength = *out_size;
@ -160,6 +161,7 @@ static NTSTATUS process_ioctl( DEVICE_OBJECT *device, ULONG code, void *in_buff,
irpsp.Parameters.DeviceIoControl.IoControlCode = code;
irpsp.Parameters.DeviceIoControl.Type3InputBuffer = in_buff;
irpsp.DeviceObject = device;
irpsp.CompletionRoutine = NULL;
mdl.Next = NULL;
mdl.Size = 0;