diff options
author | David Leonard <d@cvs.openbsd.org> | 1999-12-02 02:32:30 +0000 |
---|---|---|
committer | David Leonard <d@cvs.openbsd.org> | 1999-12-02 02:32:30 +0000 |
commit | 02887bbf2fba29245dd1e86008c36360881891f2 (patch) | |
tree | dc8cb3afc5c7753ce59a092a7cbd2d8ae7a76266 | |
parent | 1a77e52c87b568a4703ee9af87f0b20814d7dbc9 (diff) |
paranoia, add_return may change
-rw-r--r-- | usr.sbin/pppd/chat/chat.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/usr.sbin/pppd/chat/chat.c b/usr.sbin/pppd/chat/chat.c index b368d43721c..8f8e2426153 100644 --- a/usr.sbin/pppd/chat/chat.c +++ b/usr.sbin/pppd/chat/chat.c @@ -1,4 +1,4 @@ -/* $OpenBSD: chat.c,v 1.11 1999/12/02 02:22:56 d Exp $ */ +/* $OpenBSD: chat.c,v 1.12 1999/12/02 02:32:29 d Exp $ */ /* * Chat -- a program for automatic session establishment (i.e. dial @@ -83,7 +83,7 @@ #if 0 static char rcsid[] = "Id: chat.c,v 1.19 1998/03/24 23:57:48 paulus Exp $"; #else -static char rcsid[] = "$OpenBSD: chat.c,v 1.11 1999/12/02 02:22:56 d Exp $"; +static char rcsid[] = "$OpenBSD: chat.c,v 1.12 1999/12/02 02:32:29 d Exp $"; #endif #endif @@ -689,10 +689,7 @@ int sending; /* set to 1 when sending (putting) this string. */ break; } - if (add_return) - new_length++; - - new_length += 2; /* Two nuls terminate */ + new_length += 3; /* \r and two nuls */ ret = (char *)malloc(new_length); |