summaryrefslogtreecommitdiff
path: root/nscd
diff options
context:
space:
mode:
authorAndreas Schwab <schwab@redhat.com>2010-05-14 11:15:22 +0200
committerAndreas Schwab <schwab@redhat.com>2010-05-14 13:13:53 +0200
commite9691db5366a2990ccebf157c757ae60258b46d6 (patch)
treef17aa7f144b1acde14902700a13f95055bab6c70 /nscd
parent5e6e747fa224df1159f7eb32bc26d44cad0dbb17 (diff)
parent6d270188ef3fe10125b8723ed69ebdc9e90e914e (diff)
Merge remote branch 'origin/release/2.11/master' into fedora/2.11/master
Diffstat (limited to 'nscd')
-rw-r--r--nscd/aicache.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/nscd/aicache.c b/nscd/aicache.c
index 992357d2fe..3cb2208035 100644
--- a/nscd/aicache.c
+++ b/nscd/aicache.c
@@ -1,5 +1,5 @@
/* Cache handling for host lookup.
- Copyright (C) 2004-2008, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2004-2008, 2009, 2010 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@redhat.com>, 2004.
@@ -111,7 +111,7 @@ addhstaiX (struct database_dyn *db, int fd, request_header *req,
int old_res_options = _res.options;
_res.options &= ~RES_USE_INET6;
- size_t tmpbuf6len = 512;
+ size_t tmpbuf6len = 1024;
char *tmpbuf6 = alloca (tmpbuf6len);
size_t tmpbuf4len = 0;
char *tmpbuf4 = NULL;
@@ -133,9 +133,11 @@ addhstaiX (struct database_dyn *db, int fd, request_header *req,
"gethostbyname4_r");
if (fct4 != NULL)
{
- struct gaih_addrtuple *at = NULL;
+ struct gaih_addrtuple atmem;
+ struct gaih_addrtuple *at;
while (1)
{
+ at = &atmem;
rc6 = 0;
herrno = 0;
status[1] = DL_CALL_FCT (fct4, (key, &at, tmpbuf6, tmpbuf6len,
@@ -153,7 +155,7 @@ addhstaiX (struct database_dyn *db, int fd, request_header *req,
goto next_nip;
/* We found the data. Count the addresses and the size. */
- for (const struct gaih_addrtuple *at2 = at; at2 != NULL;
+ for (const struct gaih_addrtuple *at2 = at = &atmem; at2 != NULL;
at2 = at2->next)
{
++naddrs;