aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorPedro F. Giffuni <pfg@FreeBSD.org>2018-01-29 14:23:44 +0000
committerPedro F. Giffuni <pfg@FreeBSD.org>2018-01-29 14:23:44 +0000
commitd282086dec3d63472d41f8ca4aedf51d4698ad06 (patch)
treed22570b1b0ed42288f65d84959acd42dd56c7a64 /usr.sbin
parent2f2d80f73041b4d5f7457508f57ebdd5f76f95f5 (diff)
Notes
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/pppctl/pppctl.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.sbin/pppctl/pppctl.c b/usr.sbin/pppctl/pppctl.c
index 646732893b94..129dc4fdf3c6 100644
--- a/usr.sbin/pppctl/pppctl.c
+++ b/usr.sbin/pppctl/pppctl.c
@@ -121,6 +121,7 @@ static int
Receive(int fd, int display)
{
static char Buffer[LINELEN];
+ char temp[sizeof(Buffer)];
struct timeval t;
int Result;
char *last;
@@ -185,7 +186,8 @@ Receive(int fd, int display)
else
flush = last - Buffer + 1;
write(STDOUT_FILENO, Buffer, flush);
- strcpy(Buffer, Buffer + flush);
+ strcpy(temp, Buffer + flush);
+ strcpy(Buffer, temp);
len -= flush;
}
if ((Result = select(fd + 1, &f, NULL, NULL, &t)) <= 0) {