diff options
author | brian <brian@FreeBSD.org> | 2001-07-07 13:12:07 +0000 |
---|---|---|
committer | brian <brian@FreeBSD.org> | 2001-07-07 13:12:07 +0000 |
commit | c11e4967f83b90ac91163a0497922273f39e0e99 (patch) | |
tree | 2b6c91cad582aefcd6d381f0f8006fe012948b92 | |
parent | 69e8b198c501f15406c99c41c59ceb575aa9a374 (diff) | |
download | FreeBSD-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.
-rw-r--r-- | usr.sbin/ppp/ccp.c | 2 |
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; |