Author: cgutman
Date: Thu Sep 25 22:12:18 2008
New Revision: 36525
URL:
http://svn.reactos.org/svn/reactos?rev=36525&view=rev
Log:
- Return early if ProtocolNumber is too large
- Fixes coverity error 600
Modified:
branches/aicom-network-fixes/lib/drivers/ip/network/ip.c
Modified: branches/aicom-network-fixes/lib/drivers/ip/network/ip.c
URL:
http://svn.reactos.org/svn/reactos/branches/aicom-network-fixes/lib/drivers…
==============================================================================
--- branches/aicom-network-fixes/lib/drivers/ip/network/ip.c [iso-8859-1] (original)
+++ branches/aicom-network-fixes/lib/drivers/ip/network/ip.c [iso-8859-1] Thu Sep 25
22:12:18 2008
@@ -352,10 +352,10 @@
* To unregister a protocol handler, call this function with Handler = NULL
*/
{
-#ifdef DBG
- if (ProtocolNumber >= IP_PROTOCOL_TABLE_SIZE)
+ if (ProtocolNumber >= IP_PROTOCOL_TABLE_SIZE) {
TI_DbgPrint(MIN_TRACE, ("Protocol number is out of range (%d).\n",
ProtocolNumber));
-#endif
+ return;
+ }
ProtocolTable[ProtocolNumber] = Handler;
}