diff --git a/Hybrid_GPL_63168/DT-W724V-20140311/package/atp/network/fon/service/fon/src/src/ppp/pppd/eap.c b/Hybrid_GPL_63168/DT-W724V-20140311/package/atp/network/fon/service/fon/src/src/ppp/pppd/eap.c index 6203f94d0..48547e6be 100755 --- a/Hybrid_GPL_63168/DT-W724V-20140311/package/atp/network/fon/service/fon/src/src/ppp/pppd/eap.c +++ b/Hybrid_GPL_63168/DT-W724V-20140311/package/atp/network/fon/service/fon/src/src/ppp/pppd/eap.c @@ -1421,7 +1421,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'; @@ -1847,7 +1847,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';