From: Ulrich Drepper Date: Thu, 29 Jul 1999 15:48:47 +0000 (+0000) Subject: Update. X-Git-Tag: upstream/2.20~19958 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ea3e6a3a65a176a77f829e82939a13d15a1264dc;p=platform%2Fupstream%2Flinaro-glibc.git Update. 1999-07-29 Ulrich Drepper * nis/nss_nis/nis-initgroups.c (_nss_nis_initgroups): Correct size argument in realloc call. * nis/nss_compat/compat-initgroups.c (_nss_compat_initgroups): Likewise. Reported by Danny Braniss . --- diff --git a/ChangeLog b/ChangeLog index a087ab7..b11b07d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +1999-07-29 Ulrich Drepper + + * nis/nss_nis/nis-initgroups.c (_nss_nis_initgroups): Correct size + argument in realloc call. + * nis/nss_compat/compat-initgroups.c (_nss_compat_initgroups): + Likewise. + Reported by Danny Braniss . + 1999-07-28 Ulrich Drepper * misc/efgcvt.c: Use IEEE 854 formula to compute the number of digits diff --git a/nis/nss_compat/compat-initgroups.c b/nis/nss_compat/compat-initgroups.c index a0c3455..47b395e 100644 --- a/nis/nss_compat/compat-initgroups.c +++ b/nis/nss_compat/compat-initgroups.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1998 Free Software Foundation, Inc. +/* Copyright (C) 1998, 1999 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Thorsten Kukuk , 1998. @@ -620,7 +620,7 @@ _nss_compat_initgroups (const char *user, gid_t group, long int *start, if (*start == *size && limit <= 0) { /* Need a bigger buffer. */ - groups = realloc (groups, *size * sizeof (*groups)); + groups = realloc (groups, 2 * *size * sizeof (*groups)); if (groups == NULL) goto done; *size *= 2; diff --git a/nis/nss_nis/nis-initgroups.c b/nis/nss_nis/nis-initgroups.c index b69fea4..c5577c9 100644 --- a/nis/nss_nis/nis-initgroups.c +++ b/nis/nss_nis/nis-initgroups.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1998 Free Software Foundation, Inc. +/* Copyright (C) 1998, 1999 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Thorsten Kukuk , 1998. @@ -174,7 +174,7 @@ _nss_nis_initgroups (const char *user, gid_t group, long int *start, if (*start == *size && limit <= 0) { /* Need a bigger buffer. */ - groups = realloc (groups, *size * sizeof (*groups)); + groups = realloc (groups, 2 * *size * sizeof (*groups)); if (groups == NULL) goto done; *size *= 2;