Source-Changes-HG archive

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

[src/netbsd-2]: src/usr.sbin/user Pull up following revision(s) (requested by...



details:   https://anonhg.NetBSD.org/src/rev/5f99f6f28412
branches:  netbsd-2
changeset: 564542:5f99f6f28412
user:      bouyer <bouyer%NetBSD.org@localhost>
date:      Sun Oct 15 15:52:26 2006 +0000

description:
Pull up following revision(s) (requested by pavel in ticket #10718):
        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 e1765708a54c -r 5f99f6f28412 usr.sbin/user/user.c
--- a/usr.sbin/user/user.c      Sun Oct 15 15:45:48 2006 +0000
+++ b/usr.sbin/user/user.c      Sun Oct 15 15:52:26 2006 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: user.c,v 1.75.4.1 2005/07/05 19:03:56 riz Exp $ */
+/* $NetBSD: user.c,v 1.75.4.2 2006/10/15 15:52:26 bouyer 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.75.4.1 2005/07/05 19:03:56 riz Exp $");
+__RCSID("$NetBSD: user.c,v 1.75.4.2 2006/10/15 15:52:26 bouyer Exp $");
 #endif
 
 #include <sys/types.h>
@@ -2085,6 +2085,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