Author: cwittich
Date: Sun Jan 18 07:56:09 2009
New Revision: 38891
URL:
http://svn.reactos.org/svn/reactos?rev=38891&view=rev
Log:
fix kernel32 comm crash
If lpOverlapped is NULL, lpBytesReturned cannot be NULL.
Modified:
trunk/reactos/dll/win32/kernel32/misc/comm.c
Modified: trunk/reactos/dll/win32/kernel32/misc/comm.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/misc/co…
==============================================================================
--- trunk/reactos/dll/win32/kernel32/misc/comm.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/kernel32/misc/comm.c [iso-8859-1] Sun Jan 18 07:56:09 2009
@@ -354,13 +354,13 @@
}
if (!DeviceIoControl(hFile, IOCTL_SERIAL_GET_BAUD_RATE,
- NULL, 0, &BaudRate, sizeof(BaudRate), NULL, NULL) ||
+ NULL, 0, &BaudRate, sizeof(BaudRate), &dwBytesReturned,
NULL) ||
!DeviceIoControl(hFile, IOCTL_SERIAL_GET_LINE_CONTROL,
- NULL, 0, &LineControl, sizeof(LineControl), NULL, NULL) ||
+ NULL, 0, &LineControl, sizeof(LineControl),
&dwBytesReturned, NULL) ||
!DeviceIoControl(hFile, IOCTL_SERIAL_GET_HANDFLOW,
- NULL, 0, &HandFlow, sizeof(HandFlow), NULL, NULL) ||
+ NULL, 0, &HandFlow, sizeof(HandFlow), &dwBytesReturned,
NULL) ||
!DeviceIoControl(hFile, IOCTL_SERIAL_GET_CHARS,
- NULL, 0, &SpecialChars, sizeof(SpecialChars), NULL, NULL))
+ NULL, 0, &SpecialChars, sizeof(SpecialChars),
&dwBytesReturned, NULL))
return FALSE;
memset(lpDCB, 0, sizeof(*lpDCB));