Subject: bin/16871: uninitialized variable in lpc.c
To: None <gnats-bugs@gnats.netbsd.org>
From: None <Todd.Miller@courtesan.com>
List: netbsd-bugs
Date: 05/17/2002 14:11:45
>Number:         16871
>Category:       bin
>Synopsis:       uninitialized variable in lpc.c
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri May 17 14:12:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     Todd Miller
>Release:        NetBSD-current
>Organization:
>Environment:
>Description:
ingroup() in usr.sbin/lpr/lpc/lpc.c caches the user's group vector in a static array.  The number of groups in the array is contained in the variable ngroups which is *not* static.  Thus, the first time ingroup() is called things are fine, but subsequent calls use ngroup w/o setting it.
>How-To-Repeat:
Read ingroup(), see the problem.
>Fix:
Make ngroup static.
>Release-Note:
>Audit-Trail:
>Unformatted: