summaryrefslogtreecommitdiffstats
path: root/lib/libkvm
diff options
context:
space:
mode:
authorbrooks <brooks@FreeBSD.org>2009-12-10 21:16:16 +0000
committerbrooks <brooks@FreeBSD.org>2009-12-10 21:16:16 +0000
commit67de47b8de4df5b4197af523c19358d48f488697 (patch)
tree0e716d715227b81901671d2927d750c909f6d0b1 /lib/libkvm
parentc9c12aa332d42b93713e42808084974ed0f56624 (diff)
downloadFreeBSD-src-67de47b8de4df5b4197af523c19358d48f488697.zip
FreeBSD-src-67de47b8de4df5b4197af523c19358d48f488697.tar.gz
Add a missing else that negated the truncation of ki_ngroups to
NGROUPS. Submitted by: Dmitry Pryanishnikov <lynx dot ripe at gmail dot com>
Diffstat (limited to 'lib/libkvm')
-rw-r--r--lib/libkvm/kvm_proc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libkvm/kvm_proc.c b/lib/libkvm/kvm_proc.c
index 071f859..f8f8483 100644
--- a/lib/libkvm/kvm_proc.c
+++ b/lib/libkvm/kvm_proc.c
@@ -149,7 +149,7 @@ kvm_proclist(kd, what, arg, p, bp, maxcnt)
if (ucred.cr_ngroups > KI_NGROUPS) {
kp->ki_ngroups = KI_NGROUPS;
kp->ki_cr_flags |= KI_CRF_GRP_OVERFLOW;
- }
+ } else
kp->ki_ngroups = ucred.cr_ngroups;
kvm_read(kd, (u_long)ucred.cr_groups, kp->ki_groups,
kp->ki_ngroups * sizeof(gid_t));
OpenPOWER on IntegriCloud