Skip to content

Commit

Permalink
Update.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Ulrich Drepper committed Dec 13, 2004
1 parent 13d91a6 commit e1b27ff
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
6 changes: 6 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
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.

2004-12-13 Jakub Jelinek <jakub@redhat.com>

* posix/getconf.c (main): Prepend just $GETCONF_DIR/ instead of
Expand Down
2 changes: 1 addition & 1 deletion nss/getXXbyYY.c
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ FUNCTION_NAME (ADD_PARAMS)
)
{
char *new_buf;
buffer_size += BUFLEN;
buffer_size *= 2;
new_buf = (char *) realloc (buffer, buffer_size);
if (new_buf == NULL)
{
Expand Down
4 changes: 2 additions & 2 deletions nss/getnssent.c
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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)
{
Expand Down

0 comments on commit e1b27ff

Please sign in to comment.