summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGwenolé Beauchesne <gbeauchesne@mandriva.org>2003-02-21 16:25:19 +0000
committerGwenolé Beauchesne <gbeauchesne@mandriva.org>2003-02-21 16:25:19 +0000
commitf85802ab6794d5c8155b6cb8936b364445a3456a (patch)
tree26fd02b8429164eba9799d0de08790da1d087e79
parent00053a45289228ea76c13bd5f102fc21367f9e3c (diff)
downloaddrakx-backup-do-not-use-f85802ab6794d5c8155b6cb8936b364445a3456a.tar
drakx-backup-do-not-use-f85802ab6794d5c8155b6cb8936b364445a3456a.tar.gz
drakx-backup-do-not-use-f85802ab6794d5c8155b6cb8936b364445a3456a.tar.bz2
drakx-backup-do-not-use-f85802ab6794d5c8155b6cb8936b364445a3456a.tar.xz
drakx-backup-do-not-use-f85802ab6794d5c8155b6cb8936b364445a3456a.zip
Better fix for DNS resolver bug
-rw-r--r--mdk-stage1/dietlibc/libcruft/dnscruft2.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/mdk-stage1/dietlibc/libcruft/dnscruft2.c b/mdk-stage1/dietlibc/libcruft/dnscruft2.c
index 539c6c1c7..d4e132e42 100644
--- a/mdk-stage1/dietlibc/libcruft/dnscruft2.c
+++ b/mdk-stage1/dietlibc/libcruft/dnscruft2.c
@@ -43,18 +43,14 @@ int __dns_gethostbyx_r(const char* name, struct hostent* result,
int size;
if (lookfor==1) {
- /* FIXME: what does this magic constant mean? */
- result->h_aliases=(char**)(buf+2*sizeof(char*)*4);
result->h_addrtype=AF_INET;
result->h_length=4;
- result->h_addr_list=(char**)buf;
} else {
- /* FIXME: what does this magic constant mean? */
- result->h_aliases=(char**)(buf+2*sizeof(char*)*16);
result->h_addrtype=AF_INET6;
result->h_length=16;
- result->h_addr_list=(char**)buf;
}
+ result->h_aliases=(char**)(buf+8*sizeof(char*));
+ result->h_addr_list=(char**)buf;
result->h_aliases[0]=0;
cur=buf+16*sizeof(char*);
@@ -115,7 +111,7 @@ invalidpacket:
else
result->h_aliases[names-1]=cur;
result->h_aliases[names]=0;
- ++names;
+ if (names<8) ++names;
/* cur+=slen+1; */
cur+=(slen|3)+1;
result->h_addr_list[ips++] = cur;