Use static buffer to save source route hostnames.
Approved by: jkh
This commit is contained in:
parent
a82a4df889
commit
81edae92ed
@ -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