Page MenuHomeFreeBSD

D57138.diff
No OneTemporary

D57138.diff

diff --git a/usr.sbin/ppp/chap.h b/usr.sbin/ppp/chap.h
--- a/usr.sbin/ppp/chap.h
+++ b/usr.sbin/ppp/chap.h
@@ -48,8 +48,8 @@
} child;
struct authinfo auth;
struct {
- u_char local[CHAPCHALLENGELEN + AUTHLEN]; /* I invented this one */
- u_char peer[CHAPCHALLENGELEN + AUTHLEN]; /* Peer gave us this one */
+ u_char local[CHAPCHALLENGELEN + 1 + AUTHLEN]; /* I invented this one */
+ u_char peer[CHAPCHALLENGELEN + 1 + AUTHLEN]; /* Peer gave us this one */
} challenge;
#ifndef NODES
unsigned NTRespSent : 1; /* Our last response */
diff --git a/usr.sbin/ppp/chap.c b/usr.sbin/ppp/chap.c
--- a/usr.sbin/ppp/chap.c
+++ b/usr.sbin/ppp/chap.c
@@ -238,7 +238,7 @@
MD5Init(&MD5context);
MD5Update(&MD5context, &id, 1);
MD5Update(&MD5context, key, klen);
- MD5Update(&MD5context, challenge + 1, *challenge);
+ MD5Update(&MD5context, challenge + 1, (u_char)*challenge);
MD5Final(digest, &MD5context);
memcpy(digest + 16, name, nlen);
@@ -913,7 +913,7 @@
if (myans == NULL)
key = NULL;
else {
- if (!chap_Cmp(myans + 1, *myans, ans + 1, alen
+ if (!chap_Cmp(myans + 1, (u_char)*myans, ans + 1, alen
#ifndef NODES
, p->link.lcp.want_authtype, lanman
#endif
diff --git a/usr.sbin/ppp/defs.h b/usr.sbin/ppp/defs.h
--- a/usr.sbin/ppp/defs.h
+++ b/usr.sbin/ppp/defs.h
@@ -58,7 +58,7 @@
#define DEVICE_LEN SCRIPT_LEN /* Size of individual devices */
#define AUTHLEN 100 /* Size of authname/authkey */
#define CHAPDIGESTLEN 100 /* Maximum chap digest */
-#define CHAPCHALLENGELEN 48 /* Maximum chap challenge */
+#define CHAPCHALLENGELEN 255 /* Maximum chap challenge */
#define CHAPAUTHRESPONSELEN 48 /* Maximum chap authresponse (chap81) */
#define MAXARGS 40 /* How many args per config line */
#define NCP_IDLE_TIMEOUT 180 /* Drop all links */

File Metadata

Mime Type
text/plain
Expires
Mon, Aug 3, 9:02 AM (7 h, 52 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
35905874
Default Alt Text
D57138.diff (1 KB)

Event Timeline