diff options
author | Paul Mackerras <paulus@samba.org> | 2006-12-19 08:38:14 +0000 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2006-12-19 08:38:14 +0000 |
commit | 6eb63a6d40281b270c1fc56cf10452c4322daf67 (patch) | |
tree | 90b810b6f1014dd61458c2bb0acd36e607c410fa /pppd/chap_ms.c | |
parent | cd8692c099106d7acad6fd0215a899dae866792a (diff) | |
download | ppp-6eb63a6d40281b270c1fc56cf10452c4322daf67.tar.gz |
Fix bug in CHAP MS v2 handling where we didn't zero enough.
Changing the response parameter of the ChapMS2 function to an
unsigned char * meant that using sizeof(*response) in a BZERO call
was no longer correct. Instead we need to use MS_CHAP2_RESPONSE_LEN.
Patch from Guillaume Knispel.
Diffstat (limited to 'pppd/chap_ms.c')
-rw-r--r-- | pppd/chap_ms.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pppd/chap_ms.c b/pppd/chap_ms.c index 75724c5..b8feeb8 100644 --- a/pppd/chap_ms.c +++ b/pppd/chap_ms.c @@ -74,7 +74,7 @@ * */ -#define RCSID "$Id: chap_ms.c,v 1.36 2006/05/21 11:56:40 paulus Exp $" +#define RCSID "$Id: chap_ms.c,v 1.37 2006/12/19 08:38:14 paulus Exp $" #ifdef CHAPMS @@ -852,7 +852,7 @@ ChapMS2(u_char *rchallenge, u_char *PeerChallenge, u_char *p = &response[MS_CHAP2_PEER_CHALLENGE]; int i; - BZERO(response, sizeof(*response)); + BZERO(response, MS_CHAP2_RESPONSE_LEN); /* Generate the Peer-Challenge if requested, or copy it if supplied. */ if (!PeerChallenge) |