Use static buffer to save source route hostnames.

Approved by: jkh


git-svn-id: http://svn0.us-east.freebsd.org/base/head/contrib/telnet@57343 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
This commit is contained in:
shin 2000-02-19 16:33:14 +00:00
parent 62286e5a31
commit 737e54e224

View File

@ -2507,7 +2507,7 @@ tn(argc, argv)
res0 = res; res0 = res;
af_again: af_again:
if (srcroute != 0) { if (srcroute != 0) {
char hostbuf[BUFSIZ]; static char hostbuf[BUFSIZ];
if (af_error == 0) { /* save intermediate hostnames for retry */ if (af_error == 0) { /* save intermediate hostnames for retry */
strncpy(hostbuf, hostp, BUFSIZ - 1); strncpy(hostbuf, hostp, BUFSIZ - 1);