|
@@ -337,6 +337,8 @@ Domain name in a message can be represented as either:
|
|
|
|
|
|
#define MAX_RECURSE 5
|
|
|
#define MAXALIASES (4)
|
|
|
+
|
|
|
+#define ALIAS_DIM (2 + MAXALIASES + 1)
|
|
|
#define BUFSZ (80)
|
|
|
|
|
|
#define NS_TYPE_ELT 0x40
|
|
@@ -1650,9 +1652,8 @@ int __read_etc_hosts_r(
|
|
|
result_buf->h_aliases = tok+1;
|
|
|
if (action == GETHOSTENT) {
|
|
|
|
|
|
- break;
|
|
|
- }
|
|
|
- if (action == GET_HOSTS_BYADDR) {
|
|
|
+ ;
|
|
|
+ } else if (action == GET_HOSTS_BYADDR) {
|
|
|
if (strcmp(name, *tok) != 0)
|
|
|
continue;
|
|
|
} else {
|
|
@@ -2623,13 +2624,13 @@ struct hostent *gethostent(void)
|
|
|
{
|
|
|
static struct hostent hoste;
|
|
|
static char *buf = NULL;
|
|
|
- struct hostent *host;
|
|
|
+ struct hostent *host = NULL;
|
|
|
#ifndef __UCLIBC_HAS_IPV6__
|
|
|
#define HOSTENT_BUFSZ (sizeof(struct in_addr) + sizeof(struct in_addr *) * 2 + \
|
|
|
- BUFSZ + 2 )
|
|
|
+ sizeof(char *)*ALIAS_DIM + BUFSZ + 2 )
|
|
|
#else
|
|
|
#define HOSTENT_BUFSZ (sizeof(struct in6_addr) + sizeof(struct in6_addr *) * 2 + \
|
|
|
- BUFSZ + 2 )
|
|
|
+ sizeof(char *)*ALIAS_DIM + BUFSZ + 2 )
|
|
|
#endif
|
|
|
|
|
|
__INIT_GETXX_BUF(HOSTENT_BUFSZ);
|