From 827a9bc80d83ecb54757afa92a118ffb2ce9ff8a Mon Sep 17 00:00:00 2001 From: mycroft Date: Wed, 19 Mar 1997 05:34:47 +0000 Subject: [PATCH] DTRT if e_login is not NUL-terminated. --- bin/ps/print.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/ps/print.c b/bin/ps/print.c index ecb24022f354..1b6b9b9c90e9 100644 --- a/bin/ps/print.c +++ b/bin/ps/print.c @@ -1,4 +1,4 @@ -/* $NetBSD: print.c,v 1.30 1996/10/02 18:07:25 ws Exp $ */ +/* $NetBSD: print.c,v 1.31 1997/03/19 05:34:47 mycroft Exp $ */ /*- * Copyright (c) 1990, 1993, 1994 @@ -37,7 +37,7 @@ #if 0 static char sccsid[] = "@(#)print.c 8.6 (Berkeley) 4/16/94"; #else -static char rcsid[] = "$NetBSD: print.c,v 1.30 1996/10/02 18:07:25 ws Exp $"; +static char rcsid[] = "$NetBSD: print.c,v 1.31 1997/03/19 05:34:47 mycroft Exp $"; #endif #endif /* not lint */ @@ -185,7 +185,7 @@ logname(k, ve) #ifndef NEWVM (void)printf("%-*s", v->width, KI_PROC(k)->p_logname); #else - (void)printf("%-*s", v->width, KI_EPROC(k)->e_login); + (void)printf("%-*.*s", v->width, v->width, KI_EPROC(k)->e_login); #endif }