Don't try to dereference the -1th ccp algorithm array entry when we

open CCP with no algorithm.
This commit is contained in:
Brian Somers
2001-07-07 13:12:07 +00:00
parent fec754d4b4
commit 7e62c63844
+1 -1
View File
@@ -306,7 +306,7 @@ ccp_Required(struct ccp *ccp)
int
ccp_MTUOverhead(struct ccp *ccp)
{
if (ccp->fsm.state == ST_OPENED)
if (ccp->fsm.state == ST_OPENED && ccp->out.algorithm >= 0)
return algorithm[ccp->out.algorithm]->o.MTUOverhead;
return 0;