This is the mail archive of the libc-hacker@sourceware.org mailing list for the glibc project.
Note that libc-hacker is a closed list. You may look at the archives of this list, but subscription and posting are not open.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
| Other format: | [Raw text] | |
Hi!
If malloc fails, it will goto out and use there an uninitialized
any_success variable.
2006-09-05 Jakub Jelinek <jakub@redhat.com>
* nscd/initgrcache.c (addinitgroupsX): Move any_success
decl before first goto out.
--- libc/nscd/initgrcache.c.jj 2006-08-03 19:36:25.000000000 +0200
+++ libc/nscd/initgrcache.c 2006-09-05 12:20:29.000000000 +0200
@@ -107,6 +107,7 @@ addinitgroupsX (struct database_dyn *db,
long int start = 0;
bool all_tryagain = true;
+ bool any_success = false;
/* This is temporary memory, we need not (ad must not) call
mempool_alloc. */
@@ -117,7 +118,6 @@ addinitgroupsX (struct database_dyn *db,
goto out;
/* Nothing added yet. */
- bool any_success = false;
while (! no_more)
{
long int prev_start = start;
Jakub
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |