projects
/
external
/
glibc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ce803f0
)
(output_hostent): Don't crash if h_aliases is NULL.
author
Andreas Schwab
<schwab@suse.de>
Wed, 21 Jul 1999 08:19:25 +0000
(08:19 +0000)
committer
Andreas Schwab
<schwab@suse.de>
Wed, 21 Jul 1999 08:19:25 +0000
(08:19 +0000)
nss/test-netdb.c
patch
|
blob
|
history
diff --git
a/nss/test-netdb.c
b/nss/test-netdb.c
index
358d072
..
dae4fad
100644
(file)
--- a/
nss/test-netdb.c
+++ b/
nss/test-netdb.c
@@
-122,8
+122,9
@@
output_hostent (const char *call, struct hostent *hptr)
{
printf ("Call: %s returned: name: %s, addr_type: %d\n",
call, hptr->h_name, hptr->h_addrtype);
- for (pptr = hptr->h_aliases; *pptr != NULL; pptr++)
- printf (" alias: %s\n", *pptr);
+ if (hptr->h_aliases)
+ for (pptr = hptr->h_aliases; *pptr != NULL; pptr++)
+ printf (" alias: %s\n", *pptr);
for (pptr = hptr->h_addr_list; *pptr != NULL; pptr++)
printf (" ip: %s\n",