From: Andreas Schwab Date: Mon, 7 Nov 2011 10:43:13 +0000 (+0100) Subject: Fix buffer allocation in files initgroups handler X-Git-Tag: glibc-2.15~113 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ae1bc2fa1c58b13ffa83483c24e547148762e24f;p=thirdparty%2Fglibc.git Fix buffer allocation in files initgroups handler --- diff --git a/ChangeLog b/ChangeLog index e57f098e2f8..b09f5efe64f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2011-11-07 Andreas Schwab + + * nss/nss_files/files-initgroups.c (_nss_files_initgroups_dyn): + Fix size of allocated buffer. + 2011-11-04 Andreas Schwab [BZ #10103] diff --git a/nss/nss_files/files-initgroups.c b/nss/nss_files/files-initgroups.c index c343b35e56b..2f88f602e77 100644 --- a/nss/nss_files/files-initgroups.c +++ b/nss/nss_files/files-initgroups.c @@ -73,7 +73,7 @@ _nss_files_initgroups_dyn (const char *user, gid_t group, long int *start, if (buffer_use_malloc || ! __libc_use_alloca (buflen + newbuflen)) { void *newbuf = realloc (buffer_use_malloc ? buffer : NULL, - buflen); + newbuflen); if (newbuf == NULL) { *errnop = ENOMEM;