Christian Costa : ntoskrnl.exe: Don' t try to copy back data in buffered mode when we don' t expect any in process_ioctl.
Alexandre Julliard
julliard at winehq.org
Wed Oct 3 13:20:35 CDT 2012
Module: wine
Branch: master
Commit: 6643f07d2bf8df70490fe6692de1bdf356b4db1e
URL: http://source.winehq.org/git/wine.git/?a=commit;h=6643f07d2bf8df70490fe6692de1bdf356b4db1e
Author: Christian Costa <titan.costa at gmail.com>
Date: Wed Oct 3 08:55:14 2012 +0200
ntoskrnl.exe: Don't try to copy back data in buffered mode when we don't expect any in process_ioctl.
---
dlls/ntoskrnl.exe/ntoskrnl.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/dlls/ntoskrnl.exe/ntoskrnl.c b/dlls/ntoskrnl.exe/ntoskrnl.c
index 06993ee..03e932c 100644
--- a/dlls/ntoskrnl.exe/ntoskrnl.c
+++ b/dlls/ntoskrnl.exe/ntoskrnl.c
@@ -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;
More information about the wine-cvs
mailing list