Author: akhaldi
Date: Wed May 8 12:12:15 2013
New Revision: 58969
URL:
http://svn.reactos.org/svn/reactos?rev=58969&view=rev
Log:
[AFD]
* Mark SelectTimeout as a KDEFERRED_ROUTINE and fix its calling convention. This fixes a
potential stack corruption.
* Brought to you by Nikolay Borisov and the MSVC static analyzer ;)
CORE-7171 #resolve
Modified:
trunk/reactos/drivers/network/afd/afd/select.c
Modified: trunk/reactos/drivers/network/afd/afd/select.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/afd/afd/se…
==============================================================================
--- trunk/reactos/drivers/network/afd/afd/select.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/network/afd/afd/select.c [iso-8859-1] Wed May 8 12:12:15 2013
@@ -91,7 +91,8 @@
AFD_DbgPrint(MID_TRACE,("Done\n"));
}
-static VOID SelectTimeout( PKDPC Dpc,
+static KDEFERRED_ROUTINE SelectTimeout;
+static VOID NTAPI SelectTimeout( PKDPC Dpc,
PVOID DeferredContext,
PVOID SystemArgument1,
PVOID SystemArgument2 ) {
@@ -235,9 +236,7 @@
KeInitializeTimerEx( &Poll->Timer, NotificationTimer );
- KeInitializeDpc( (PRKDPC)&Poll->TimeoutDpc,
- (PKDEFERRED_ROUTINE)SelectTimeout,
- Poll );
+ KeInitializeDpc( (PRKDPC)&Poll->TimeoutDpc, SelectTimeout, Poll );
InsertTailList( &DeviceExt->Polls, &Poll->ListEntry );