Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-3-0]: src/usr.sbin/user Pull up following revision(s) (requested ...
details: https://anonhg.NetBSD.org/src/rev/797ac2087a70
branches: netbsd-3-0
changeset: 579308:797ac2087a70
user: ghen <ghen%NetBSD.org@localhost>
date: Mon Oct 16 21:46:06 2006 +0000
description:
Pull up following revision(s) (requested by pavel in ticket #1554):
usr.sbin/user/user.c: revision 1.112
in userinfo, initialize buf (the buffer which will hold group names)
to be a null-terminated string. Otherwise, if the user is not a member
of any secondary groups, buf is completely uninitialized and userinfo
adds garbage to the list of groups printed.
diffstat:
usr.sbin/user/user.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diffs (26 lines):
diff -r 936c72a55b47 -r 797ac2087a70 usr.sbin/user/user.c
--- a/usr.sbin/user/user.c Mon Oct 16 21:28:25 2006 +0000
+++ b/usr.sbin/user/user.c Mon Oct 16 21:46:06 2006 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: user.c,v 1.77.2.3 2005/06/29 12:18:49 tron Exp $ */
+/* $NetBSD: user.c,v 1.77.2.3.2.1 2006/10/16 21:46:06 ghen Exp $ */
/*
* Copyright (c) 1999 Alistair G. Crooks. All rights reserved.
@@ -35,7 +35,7 @@
#ifndef lint
__COPYRIGHT("@(#) Copyright (c) 1999 \
The NetBSD Foundation, Inc. All rights reserved.");
-__RCSID("$NetBSD: user.c,v 1.77.2.3 2005/06/29 12:18:49 tron Exp $");
+__RCSID("$NetBSD: user.c,v 1.77.2.3.2.1 2006/10/16 21:46:06 ghen Exp $");
#endif
#include <sys/types.h>
@@ -2098,6 +2098,7 @@
int i;
exists = 0;
+ buf[0] = '\0';
while ((i = getopt(argc, argv, "ev")) != -1) {
switch(i) {
case 'e':
Home |
Main Index |
Thread Index |
Old Index