summaryrefslogtreecommitdiff
path: root/usr.sbin/ppp/chat.c
diff options
context:
space:
mode:
authorbrian <brian@cvs.openbsd.org>1997-12-23 22:38:04 +0000
committerbrian <brian@cvs.openbsd.org>1997-12-23 22:38:04 +0000
commit5b328ddb5aa49cb7e5e4d9072e21d9e4b1f90acd (patch)
tree4340619842ab0940f8d489b47a4806655b4d5afa /usr.sbin/ppp/chat.c
parent54118aee3c311f24af1c94a68759b0863cf8392f (diff)
strncpy(x,y,sizeof(x)) --> strncpy(x,y,sizeof(x)-1)
Suggested by: Philippe Charnier <charnier@lirmm.fr> Theo de Raadt <deraadt@cvs.openbsd.org>
Diffstat (limited to 'usr.sbin/ppp/chat.c')
-rw-r--r--usr.sbin/ppp/chat.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/ppp/chat.c b/usr.sbin/ppp/chat.c
index f12d98c92cb..dcc10b607c0 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.2 1997/12/18 01:10:24 brian Exp $
+ * $Id: chat.c,v 1.3 1997/12/23 22:38:01 brian Exp $
*
* TODO:
* o Support more UUCP compatible control sequences.
@@ -186,7 +186,7 @@ ExpandString(const char *str, char *result, int reslen, int sendmode)
case 'T':
if (VarAltPhone == NULL) {
if (VarNextPhone == NULL) {
- strncpy(VarPhoneCopy, VarPhoneList, sizeof(VarPhoneCopy));
+ strncpy(VarPhoneCopy, VarPhoneList, sizeof(VarPhoneCopy) - 1);
VarPhoneCopy[sizeof(VarPhoneCopy) - 1] = '\0';
VarNextPhone = VarPhoneCopy;
}