diff options
Diffstat (limited to 'usr.sbin/ppp/chat.c')
-rw-r--r-- | usr.sbin/ppp/chat.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.sbin/ppp/chat.c b/usr.sbin/ppp/chat.c index 396927e..5026c37 100644 --- a/usr.sbin/ppp/chat.c +++ b/usr.sbin/ppp/chat.c @@ -18,7 +18,7 @@ * Columbus, OH 43221 * (614)451-1883 * - * $Id: chat.c,v 1.38 1997/11/09 14:18:36 brian Exp $ + * $Id: chat.c,v 1.39 1997/11/22 03:37:26 brian Exp $ * * TODO: * o Support more UUCP compatible control sequences. @@ -186,7 +186,8 @@ ExpandString(const char *str, char *result, int reslen, int sendmode) case 'T': if (VarAltPhone == NULL) { if (VarNextPhone == NULL) { - strcpy(VarPhoneCopy, VarPhoneList); + strncpy(VarPhoneCopy, VarPhoneList, sizeof(VarPhoneCopy)); + VarPhoneCopy[sizeof(VarPhoneCopy) - 1] = '\0'; VarNextPhone = VarPhoneCopy; } VarAltPhone = strsep(&VarNextPhone, ":"); |