diff options
author | brian <brian@cvs.openbsd.org> | 1999-02-07 13:56:20 +0000 |
---|---|---|
committer | brian <brian@cvs.openbsd.org> | 1999-02-07 13:56:20 +0000 |
commit | 15dc24dae8a96b0c094ee5115e887d8ccfaeaa25 (patch) | |
tree | a6b942878b902569baf22ffcbdb37ce0d4e1671e /usr.sbin | |
parent | b8d76e2a81cd9b4d68019713668fad78244ce3de (diff) |
Correct server-side chap authentication comparison
(broken with last commit).
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/ppp/ppp/chap.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/ppp/ppp/chap.c b/usr.sbin/ppp/ppp/chap.c index 5edc2bccf0e..ffb204b2563 100644 --- a/usr.sbin/ppp/ppp/chap.c +++ b/usr.sbin/ppp/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.3 1999/02/07 13:48:33 brian Exp $ + * $Id: chap.c,v 1.4 1999/02/07 13:56:19 brian Exp $ * * TODO: */ @@ -367,7 +367,7 @@ chap_Input(struct physical *p, struct mbuf *bp) if (myans == NULL) key = NULL; else { - if (memcmp(myans, ans, 1 + *myans)) + if (*myans != alen || memcmp(myans + 1, ans + 1, *myans)) key = NULL; free(myans); } |