]> git.ozlabs.org Git - ppp.git/blobdiff - pppd/chap.c
use strlcpy, strlcat, slprintf everywhere
[ppp.git] / pppd / chap.c
index 06c17e8bfdf71daeb31fef91e1f3bdc39a618cfa..6b405f195d409d62734294544ed9707256c1080a 100644 (file)
@@ -34,7 +34,7 @@
  */
 
 #ifndef lint
-static char rcsid[] = "$Id: chap.c,v 1.16 1998/11/07 06:59:26 paulus Exp $";
+static char rcsid[] = "$Id: chap.c,v 1.18 1999/03/12 06:07:15 paulus Exp $";
 #endif
 
 /*
@@ -66,7 +66,7 @@ static option_t chap_option_list[] = {
       "Set interval for rechallenge" },
 #ifdef MSLANMAN
     { "ms-lanman", o_bool, &ms_lanman,
-      "Use LanMan psswd when using MS-CHAP", 1 },
+      "Use LanMan passwd when using MS-CHAP", 1 },
 #endif
     { NULL }
 };
@@ -442,8 +442,7 @@ ChapReceiveChallenge(cstate, inp, id, len)
 
     /* Microsoft doesn't send their name back in the PPP packet */
     if (remote_name[0] != 0 && (explicit_remote || rhostname[0] == 0)) {
-       strncpy(rhostname, remote_name, sizeof(rhostname));
-       rhostname[sizeof(rhostname) - 1] = 0;
+       strlcpy(rhostname, sizeof(rhostname), remote_name);
        CHAPDEBUG((LOG_INFO, "ChapReceiveChallenge: using '%s' as remote name",
                   rhostname));
     }