mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-06 17:18:32 +00:00
Hostname points to static area which overrides with each gethost*
call, strdup() it.
This commit is contained in:
parent
5e26f56623
commit
22cb768412
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=13489
|
@ -393,7 +393,7 @@ main(argc, argv)
|
|||
if (hp) {
|
||||
to->sin_family = hp->h_addrtype;
|
||||
bcopy(hp->h_addr, (caddr_t)&to->sin_addr, hp->h_length);
|
||||
hostname = hp->h_name;
|
||||
hostname = strdup(hp->h_name);
|
||||
} else {
|
||||
(void)fprintf(stderr,
|
||||
"traceroute: unknown host %s\n", *argv);
|
||||
|
|
Loading…
Reference in a new issue