Author: janderwald
Date: Thu Mar 10 14:07:55 2011
New Revision: 51010
URL:
http://svn.reactos.org/svn/reactos?rev=51010&view=rev
Log:
[MSAFD]
- Fix bug introduced in 51007
Modified:
trunk/reactos/dll/win32/msafd/misc/dllmain.c
Modified: trunk/reactos/dll/win32/msafd/misc/dllmain.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msafd/misc/dllma…
==============================================================================
--- trunk/reactos/dll/win32/msafd/misc/dllmain.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/msafd/misc/dllmain.c [iso-8859-1] Thu Mar 10 14:07:55 2011
@@ -907,7 +907,7 @@
}
PollInfo->HandleCount = j;
- PollBufferSize = sizeof(AFD_POLL_INFO) + (PollInfo->HandleCount > 1 ?
sizeof(HANDLE) * ( PollInfo->HandleCount - 1) : 0);
+ PollBufferSize = FIELD_OFFSET(AFD_POLL_INFO, Handles) + PollInfo->HandleCount *
sizeof(AFD_HANDLE);
/* Send IOCTL */
Status = NtDeviceIoControlFile((HANDLE)PollInfo->Handles[0].Handle,