summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ppp/chap.c
diff options
context:
space:
mode:
authorbrian <brian@FreeBSD.org>1999-02-07 13:56:29 +0000
committerbrian <brian@FreeBSD.org>1999-02-07 13:56:29 +0000
commit7537d2c54d4775e29dd02308eb7122f0f465f865 (patch)
tree81826c3878bcdd102886412df14e475da697a561 /usr.sbin/ppp/chap.c
parentc661658ae7cbb345eb3155a9bdb27fef06290ac5 (diff)
downloadFreeBSD-src-7537d2c54d4775e29dd02308eb7122f0f465f865.zip
FreeBSD-src-7537d2c54d4775e29dd02308eb7122f0f465f865.tar.gz
Correct server-side chap authentication comparison
(broken with last commit).
Diffstat (limited to 'usr.sbin/ppp/chap.c')
-rw-r--r--usr.sbin/ppp/chap.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/ppp/chap.c b/usr.sbin/ppp/chap.c
index 1889054..495fdde 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.40 1999/02/06 02:54:44 brian Exp $
+ * $Id: chap.c,v 1.41 1999/02/07 13:48:38 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);
}
OpenPOWER on IntegriCloud