Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. =================================================================== RCS file: /ftp/cvs/cvsroot/src/external/bsd/ppp/dist/pppd/eap.c,v rcsdiff: /ftp/cvs/cvsroot/src/external/bsd/ppp/dist/pppd/eap.c,v: warning: Unknown phrases like `commitid ...;' are present. retrieving revision 1.4 retrieving revision 1.4.8.1 diff -u -p -r1.4 -r1.4.8.1 --- src/external/bsd/ppp/dist/pppd/eap.c 2014/10/25 21:11:37 1.4 +++ src/external/bsd/ppp/dist/pppd/eap.c 2020/02/12 20:13:57 1.4.8.1 @@ -1,4 +1,4 @@ -/* $NetBSD: eap.c,v 1.4 2014/10/25 21:11:37 christos Exp $ */ +/* $NetBSD: eap.c,v 1.4.8.1 2020/02/12 20:13:57 martin Exp $ */ /* * eap.c - Extensible Authentication Protocol for PPP (RFC 2284) * @@ -49,7 +49,7 @@ #define RCSID "Id: eap.c,v 1.4 2004/11/09 22:39:25 paulus Exp " static const char rcsid[] = RCSID; #else -__RCSID("$NetBSD: eap.c,v 1.4 2014/10/25 21:11:37 christos Exp $"); +__RCSID("$NetBSD: eap.c,v 1.4.8.1 2020/02/12 20:13:57 martin Exp $"); #endif /* @@ -1433,7 +1433,7 @@ int len; } /* Not so likely to happen. */ - if (vallen >= len + sizeof (rhostname)) { + if (len - vallen >= sizeof (rhostname)) { dbglog("EAP: trimming really long peer name down"); BCOPY(inp + vallen, rhostname, sizeof (rhostname) - 1); rhostname[sizeof (rhostname) - 1] = '\0'; @@ -1859,7 +1859,7 @@ int len; } /* Not so likely to happen. */ - if (vallen >= len + sizeof (rhostname)) { + if (len - vallen >= sizeof (rhostname)) { dbglog("EAP: trimming really long peer name down"); BCOPY(inp + vallen, rhostname, sizeof (rhostname) - 1); rhostname[sizeof (rhostname) - 1] = '\0';