mirror of
https://github.com/reactos/reactos.git
synced 2025-07-25 05:43:43 +00:00
- Return early if ProtocolNumber is too large
- Fixes coverity error 600 svn path=/branches/aicom-network-fixes/; revision=36525
This commit is contained in:
parent
d8398cc719
commit
9023e12475
1 changed files with 3 additions and 3 deletions
|
@ -352,10 +352,10 @@ VOID IPRegisterProtocol(
|
||||||
* To unregister a protocol handler, call this function with Handler = NULL
|
* 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));
|
TI_DbgPrint(MIN_TRACE, ("Protocol number is out of range (%d).\n", ProtocolNumber));
|
||||||
#endif
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
ProtocolTable[ProtocolNumber] = Handler;
|
ProtocolTable[ProtocolNumber] = Handler;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue