From 81edae92ede565315140ec8b86fb886e39723989 Mon Sep 17 00:00:00 2001 From: Yoshinobu Inoue Date: Sat, 19 Feb 2000 16:33:14 +0000 Subject: [PATCH] Use static buffer to save source route hostnames. Approved by: jkh --- contrib/telnet/telnet/commands.c | 2 +- crypto/telnet/telnet/commands.c | 2 +- usr.bin/telnet/commands.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/contrib/telnet/telnet/commands.c b/contrib/telnet/telnet/commands.c index 24e5e436b56..0d4bd38751e 100644 --- a/contrib/telnet/telnet/commands.c +++ b/contrib/telnet/telnet/commands.c @@ -2507,7 +2507,7 @@ tn(argc, argv) res0 = res; af_again: if (srcroute != 0) { - char hostbuf[BUFSIZ]; + static char hostbuf[BUFSIZ]; if (af_error == 0) { /* save intermediate hostnames for retry */ strncpy(hostbuf, hostp, BUFSIZ - 1); diff --git a/crypto/telnet/telnet/commands.c b/crypto/telnet/telnet/commands.c index 24e5e436b56..0d4bd38751e 100644 --- a/crypto/telnet/telnet/commands.c +++ b/crypto/telnet/telnet/commands.c @@ -2507,7 +2507,7 @@ tn(argc, argv) res0 = res; af_again: if (srcroute != 0) { - char hostbuf[BUFSIZ]; + static char hostbuf[BUFSIZ]; if (af_error == 0) { /* save intermediate hostnames for retry */ strncpy(hostbuf, hostp, BUFSIZ - 1); diff --git a/usr.bin/telnet/commands.c b/usr.bin/telnet/commands.c index 9ff560a71b4..0beb9064088 100644 --- a/usr.bin/telnet/commands.c +++ b/usr.bin/telnet/commands.c @@ -2331,7 +2331,7 @@ tn(argc, argv) res0 = res; af_again: if (srcroute != 0) { - char hostbuf[BUFSIZ]; + static char hostbuf[BUFSIZ]; if (af_error == 0) { /* save intermediate hostnames for retry */ strncpy(hostbuf, hostp, BUFSIZ - 1);