diff options
author | jkh <jkh@FreeBSD.org> | 1996-10-12 16:20:34 +0000 |
---|---|---|
committer | jkh <jkh@FreeBSD.org> | 1996-10-12 16:20:34 +0000 |
commit | bba6a15120372e3d04f14cec0157e229a6953825 (patch) | |
tree | 9aaae040d84f7ca8e4d17ddd75851bfa12290e17 /usr.sbin/ppp/chap.c | |
parent | 4ea380d58eccafbaafafcc405737bfcb59e8ee8b (diff) | |
download | FreeBSD-src-bba6a15120372e3d04f14cec0157e229a6953825.zip FreeBSD-src-bba6a15120372e3d04f14cec0157e229a6953825.tar.gz |
1. Room to calculate MD5 for CHAP negotiation is shorter than
required. a core is not dumped at first connecting time and
dumped at second or third time. (patch I)
2. A routine for "show route" refers out of allocated space.
Values pointed by "lp" should be read as CHAR, I think.
there is also no free() for disallocation. (patch II)
Here is also a patch for an improvement: In current imprementation,
even if PPP connection is disconnected by time out, prompt of
interactive mode does not change from "PPP>" to "ppp>" to
indicate the disconnection on a terminal.
So I modified the code to do that. (patch III)
Submitted-By: NAKAMURA Motonori <motonori@econ.kyoto-u.ac.jp>
Diffstat (limited to 'usr.sbin/ppp/chap.c')
-rw-r--r-- | usr.sbin/ppp/chap.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.sbin/ppp/chap.c b/usr.sbin/ppp/chap.c index 9b1937c..a3b1f80 100644 --- a/usr.sbin/ppp/chap.c +++ b/usr.sbin/ppp/chap.c @@ -17,7 +17,7 @@ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. * - * $Id: chap.c,v 1.5 1996/01/30 11:08:25 dfr Exp $ + * $Id: chap.c,v 1.6 1996/05/11 20:48:16 phk Exp $ * * TODO: */ @@ -147,7 +147,7 @@ struct mbuf *bp; } name = VarAuthName; namelen = strlen(VarAuthName); - argp = malloc(1 + valsize + namelen); + argp = malloc(1 + valsize + namelen + 16); digest = argp; *digest++ = 16; /* value size */ ap = answer; @@ -169,6 +169,7 @@ struct mbuf *bp; ap += namelen; /* Send answer to the peer */ ChapOutput(CHAP_RESPONSE, chp->id, argp, namelen + 17); + free(argp); break; case CHAP_RESPONSE: if (keyp) { |