bug-glibc
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

small bug in initgroups


From: Claudia Moroder
Subject: small bug in initgroups
Date: Mon, 25 Sep 2000 21:17:59 +0200

Hello,

I would like report the following deficency in initgroups.c

In the initgroup function there is a loop on gr_mem

...

if (grpbuf.gr_gid != group)

{

char **m;

for (m = grpbuf.gr_mem; *m != NULL; ++m)

if (strcmp (*m, user) == 0)

...

 

but there is no control if gr_mem is null.

The following line should be added

 

---> if (grpbuf.gr_mem!=NULL) { <---

for (m = grpbuf.gr_mem; *m != NULL; ++m)

....

}

Maybe the nss service should alway give back a gr_mem different from NULL, but

1. that is not documented ( maybe it is, but I did not find it )

2. pointers should always be tested against NULL.

Best regards an thank you all for the libc

 

Andreas Moroder


reply via email to

[Prev in Thread] Current Thread [Next in Thread]