]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Fix buffer allocation in files initgroups handler
authorAndreas Schwab <schwab@redhat.com>
Mon, 7 Nov 2011 10:43:13 +0000 (11:43 +0100)
committerAndreas Schwab <schwab@redhat.com>
Mon, 7 Nov 2011 10:49:51 +0000 (11:49 +0100)
ChangeLog
nss/nss_files/files-initgroups.c

index e57f098e2f8a226fec6e97305892780062aee2f4..b09f5efe64fff35dfcf05bcd9581e2fd022d062d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2011-11-07  Andreas Schwab  <schwab@redhat.com>
+
+       * nss/nss_files/files-initgroups.c (_nss_files_initgroups_dyn):
+       Fix size of allocated buffer.
+
 2011-11-04  Andreas Schwab  <schwab@redhat.com>
 
        [BZ #10103]
index c343b35e56b4eb948ecea49b5aa74ae588b81c04..2f88f602e772c609e5bd198d8609ae9d2d46ed78 100644 (file)
@@ -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;