about summary refs log tree commit diff
path: root/nscd/nscd_gethst_r.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2005-02-21 23:43:21 +0000
committerUlrich Drepper <drepper@redhat.com>2005-02-21 23:43:21 +0000
commit4379b403412eff757728a57d33bfdd66eebda62a (patch)
tree2e7a04f593e473d437a1b4ea81bb33b15b58f790 /nscd/nscd_gethst_r.c
parent553cc5f9ad5408fc7fb49a33417acc1446f0c548 (diff)
downloadglibc-4379b403412eff757728a57d33bfdd66eebda62a.tar.gz
glibc-4379b403412eff757728a57d33bfdd66eebda62a.tar.xz
glibc-4379b403412eff757728a57d33bfdd66eebda62a.zip
* nscd/nscd_gethst_r.c (nscd_gethst_r): Set *h_errnop to
	NETDB_INTERNAL if buffer is too small.

	* nscd/hstcache.c (INCR): Remove.
	(addhstbyX): Double buflen in each iteration rather than add INCR.
	* nscd/grpcache.c: Likewise.
	* nscd/pwdcache.c: Likewise.
Diffstat (limited to 'nscd/nscd_gethst_r.c')
-rw-r--r--nscd/nscd_gethst_r.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/nscd/nscd_gethst_r.c b/nscd/nscd_gethst_r.c
index 5d9d569107..ef27e68735 100644
--- a/nscd/nscd_gethst_r.c
+++ b/nscd/nscd_gethst_r.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998-2002, 2003, 2004 Free Software Foundation, Inc.
+/* Copyright (C) 1998-2002, 2003, 2004, 2005 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
 
@@ -218,6 +218,7 @@ nscd_gethst_r (const char *key, size_t keylen, request_type type,
 						   ? INADDRSZ : IN6ADDRSZ)))
 	{
 	no_room:
+	  *h_errnop = NETDB_INTERNAL;
 	  __set_errno (ERANGE);
 	  retval = ERANGE;
 	  goto out_close;