"Alfred M. Szmidt" <[EMAIL PROTECTED]> writes:

>       gbuf = xmalloc (gbuf, n * sizeof *gbuf);

Thanks for reporting that.  I installed the following patch into
gnulib.  This code is fairly new and gets compiled only for ancient
hosts, which explains why nobody else has run into the problem yet.

2003-12-03  Paul Eggert  <[EMAIL PROTECTED]>

        * getgroups.c (getgroups): xmalloc takes one argument, not two.
        Bug reported by Alfred M. Szmidt.

Index: getgroups.c
===================================================================
RCS file: /cvsroot/gnulib/gnulib/lib/getgroups.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -p -u -r1.9 -r1.10
--- getgroups.c 29 Oct 2003 17:27:58 -0000      1.9
+++ getgroups.c 3 Dec 2003 10:17:42 -0000       1.10
@@ -48,7 +48,7 @@ getgroups (int n, GETGROUPS_T *group)
       /* No need to worry about address arithmetic overflow here,
         since the ancient systems that we're running on have low
         limits on the number of secondary groups.  */
-      gbuf = xmalloc (gbuf, n * sizeof *gbuf);
+      gbuf = xmalloc (n * sizeof *gbuf);
       n_groups = getgroups (n, gbuf);
       if (n_groups < n)
        break;


_______________________________________________
Bug-coreutils mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/bug-coreutils

Reply via email to