Author: cgutman
Date: Sat Sep 13 07:22:45 2008
New Revision: 36185
URL:
http://svn.reactos.org/svn/reactos?rev=36185&view=rev
Log:
- Fix a possible crash
Modified:
branches/aicom-network-fixes/drivers/network/ndis/ndis/buffer.c
Modified: branches/aicom-network-fixes/drivers/network/ndis/ndis/buffer.c
URL:
http://svn.reactos.org/svn/reactos/branches/aicom-network-fixes/drivers/net…
==============================================================================
--- branches/aicom-network-fixes/drivers/network/ndis/ndis/buffer.c [iso-8859-1]
(original)
+++ branches/aicom-network-fixes/drivers/network/ndis/ndis/buffer.c [iso-8859-1] Sat Sep
13 07:22:45 2008
@@ -891,13 +891,15 @@
Buffer = _Packet->Private.Head;
*_FirstBuffer = Buffer;
- *_FirstBufferVA = MmGetMdlVirtualAddress(Buffer);
if (Buffer != NULL) {
*_FirstBufferLength = MmGetMdlByteCount(Buffer);
+ *_FirstBufferVA = MmGetMdlVirtualAddress(Buffer);
Buffer = Buffer->Next;
- } else
+ } else {
*_FirstBufferLength = 0;
+ *_FirstBufferVA = NULL;
+ }
*_TotalBufferLength = *_FirstBufferLength;