Fwd: Re: [ALTERNATIVE PATCH] coreutils/id.c: broken logic ?

Tito farmatito at tiscali.it
Wed Jun 22 06:15:12 UTC 2011



On Wednesday 22 June 2011 05:25:20 Denys Vlasenko wrote:
> On Monday 20 June 2011 07:46, Tito wrote:
> > Hi Denys,
> > Could you please take a look at this patch when you have time.
> > It was acked by Alexey Fomenko. 
> 
> I don't understand where is the bug you are fixing.

Hi,
if I recall correctly getgroups() on error returns -1
but doesn't set n to the needed number for reallocation.
This messes up things on next call of getgroups.
You can test this by lowering n=2 and use a user with 3 group memberships.
Can't retest now myself as I'm a little on hurry.

Ciao,
Tito




More information about the busybox mailing list