Author: cgutman
Date: Sun Aug 1 23:52:23 2010
New Revision: 48405
URL:
http://svn.reactos.org/svn/reactos?rev=48405&view=rev
Log:
[AFD]: BytesAvailable needs to be updated even when peeking so we don't run off the
end of our buffer
Modified:
trunk/reactos/drivers/network/afd/afd/read.c
Modified: trunk/reactos/drivers/network/afd/afd/read.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/afd/afd/re…
==============================================================================
--- trunk/reactos/drivers/network/afd/afd/read.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/network/afd/afd/read.c [iso-8859-1] Sun Aug 1 23:52:23 2010
@@ -122,11 +122,10 @@
*TotalBytesCopied += BytesToCopy;
FcbBytesCopied += BytesToCopy;
-
- if (!(RecvReq->TdiFlags & TDI_RECEIVE_PEEK)) {
+ BytesAvailable -= BytesToCopy;
+
+ if (!(RecvReq->TdiFlags & TDI_RECEIVE_PEEK))
FCB->Recv.BytesUsed += BytesToCopy;
- BytesAvailable -= BytesToCopy;
- }
}
}