mirror of
https://sourceware.org/git/glibc.git
synced 2025-08-05 19:35:52 +03:00
Update.
* nss/test-netdb.c (test_hosts): Don't segfault if gethostname returns NULL.
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
2001-08-24 Ulrich Drepper <drepper@redhat.com>
|
||||
|
||||
* nss/test-netdb.c (test_hosts): Don't segfault if gethostname
|
||||
returns NULL.
|
||||
|
||||
* elf/do-rel.h (elf_dynamic_do_rel): Fix problem with ld.so
|
||||
startup. Explicitly remove lazy part for RTLD_BOOTSTRAP since gcc
|
||||
doesn't do it.
|
||||
|
@@ -185,9 +185,12 @@ test_hosts (void)
|
||||
if (gethostname (name, namelen) == 0)
|
||||
{
|
||||
printf ("Hostname: %s\n", name);
|
||||
if (name != NULL)
|
||||
{
|
||||
hptr1 = gethostbyname (name);
|
||||
output_hostent ("gethostbyname (gethostname(...))", hptr1);
|
||||
}
|
||||
}
|
||||
|
||||
ip.s_addr = htonl (INADDR_LOOPBACK);
|
||||
hptr1 = gethostbyaddr ((char *) &ip, sizeof(ip), AF_INET);
|
||||
|
Reference in New Issue
Block a user