diff options
Diffstat (limited to 'usr.sbin/ppp/command.c')
-rw-r--r-- | usr.sbin/ppp/command.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.sbin/ppp/command.c b/usr.sbin/ppp/command.c index dc10681..ecab28c 100644 --- a/usr.sbin/ppp/command.c +++ b/usr.sbin/ppp/command.c @@ -17,7 +17,7 @@ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. * - * $Id: command.c,v 1.112 1997/12/17 21:21:38 brian Exp $ + * $Id: command.c,v 1.113 1997/12/18 00:28:35 brian Exp $ * */ #include <sys/param.h> @@ -1360,7 +1360,8 @@ SetVariable(struct cmdargs const *arg) case VAR_PHONE: strncpy(VarPhoneList, argp, sizeof(VarPhoneList) - 1); VarPhoneList[sizeof(VarPhoneList) - 1] = '\0'; - strcpy(VarPhoneCopy, VarPhoneList); + strncpy(VarPhoneCopy, VarPhoneList, sizeof(VarPhoneCopy)); + VarPhoneCopy[sizeof(VarPhoneCopy) - 1] = '\0'; VarNextPhone = VarPhoneCopy; VarAltPhone = NULL; break; |