aboutsummaryrefslogtreecommitdiff
path: root/nss/getnssent.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2004-12-13 21:50:20 +0000
committerUlrich Drepper <drepper@redhat.com>2004-12-13 21:50:20 +0000
commite1b27ffbf604546725eca78ef498b88fd60c4f42 (patch)
treef7dfd2321f16eaf4e8f2ab1797927a435259d2f3 /nss/getnssent.c
parent13d91a6eec2114fdfe8fac60323347335a1e0697 (diff)
downloadglibc-e1b27ffbf604546725eca78ef498b88fd60c4f42.zip
glibc-e1b27ffbf604546725eca78ef498b88fd60c4f42.tar.gz
glibc-e1b27ffbf604546725eca78ef498b88fd60c4f42.tar.bz2
2004-12-13 Ulrich Drepper <drepper@redhat.com> * nss/getnssent.c (__nss_getent): Double buffer size each round to avoid problems with delays for some people's huge entries. * nss/getXXbyYY.c (FUNCTION_NAME): Likewise.
Diffstat (limited to 'nss/getnssent.c')
-rw-r--r--nss/getnssent.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/nss/getnssent.c b/nss/getnssent.c
index a56d34d..1f7573d 100644
--- a/nss/getnssent.c
+++ b/nss/getnssent.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000 Free Software Foundation, Inc.
+/* Copyright (C) 2000, 2004 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -38,7 +38,7 @@ __nss_getent (getent_r_function func, void **resbuf, char **buffer,
&& (h_errnop == NULL || *h_errnop == NETDB_INTERNAL))
{
char *new_buf;
- *buffer_size += buflen;
+ *buffer_size *= 2;
new_buf = realloc (*buffer, *buffer_size);
if (new_buf == NULL)
{