ntoskrnl.exe: Don't try to copy back data in buffered mode when we don't expect any in process_ioctl.

This commit is contained in:
Christian Costa 2012-10-03 08:55:14 +02:00 committed by Alexandre Julliard
parent ea943293c6
commit 6643f07d2b
1 changed files with 1 additions and 1 deletions

View File

@ -197,7 +197,7 @@ static NTSTATUS process_ioctl( DEVICE_OBJECT *device, ULONG code, void *in_buff,
*out_size = (irp.IoStatus.u.Status >= 0) ? irp.IoStatus.Information : 0;
if ((code & 3) == METHOD_BUFFERED)
{
memcpy( out_buff, irp.AssociatedIrp.SystemBuffer, *out_size );
if (out_buff) memcpy( out_buff, irp.AssociatedIrp.SystemBuffer, *out_size );
HeapFree( GetProcessHeap(), 0, irp.AssociatedIrp.SystemBuffer );
}
return irp.IoStatus.u.Status;