summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ppp/ccp.c
diff options
context:
space:
mode:
authorbrian <brian@FreeBSD.org>2001-07-07 13:12:07 +0000
committerbrian <brian@FreeBSD.org>2001-07-07 13:12:07 +0000
commitc11e4967f83b90ac91163a0497922273f39e0e99 (patch)
tree2b6c91cad582aefcd6d381f0f8006fe012948b92 /usr.sbin/ppp/ccp.c
parent69e8b198c501f15406c99c41c59ceb575aa9a374 (diff)
downloadFreeBSD-src-c11e4967f83b90ac91163a0497922273f39e0e99.zip
FreeBSD-src-c11e4967f83b90ac91163a0497922273f39e0e99.tar.gz
Don't try to dereference the -1th ccp algorithm array entry when we
open CCP with no algorithm.
Diffstat (limited to 'usr.sbin/ppp/ccp.c')
-rw-r--r--usr.sbin/ppp/ccp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.sbin/ppp/ccp.c b/usr.sbin/ppp/ccp.c
index 0516024..278fd50 100644
--- a/usr.sbin/ppp/ccp.c
+++ b/usr.sbin/ppp/ccp.c
@@ -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;
OpenPOWER on IntegriCloud