Don't try to dereference the -1th ccp algorithm array entry when we
open CCP with no algorithm.
This commit is contained in:
+1
-1
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user