Use static buffer to save source route hostnames.
Approved by: jkh
This commit is contained in:
parent
a82a4df889
commit
81edae92ed
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=57343
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user