diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1997-04-13 02:21:17 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1997-04-13 02:21:17 +0000 |
commit | 7df5c2149408ef038db6f223799b9c0fdf49f757 (patch) | |
tree | b9c853afaded19d64490bfa7a25f876a744d51ae /usr.bin | |
parent | 02886de0d7e3c6686ab72bb80e9e4bdc4d17dcb4 (diff) |
buf oflow; bitblt
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/rwho/rwho.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/usr.bin/rwho/rwho.c b/usr.bin/rwho/rwho.c index c53ff950ca9..90ce15068f9 100644 --- a/usr.bin/rwho/rwho.c +++ b/usr.bin/rwho/rwho.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rwho.c,v 1.6 1997/03/26 18:02:37 deraadt Exp $ */ +/* $OpenBSD: rwho.c,v 1.7 1997/04/13 02:21:16 deraadt Exp $ */ /* * Copyright (c) 1983 The Regents of the University of California. @@ -41,7 +41,7 @@ char copyright[] = #ifndef lint /*static char sccsid[] = "from: @(#)rwho.c 5.5 (Berkeley) 6/1/90";*/ -static char rcsid[] = "$OpenBSD: rwho.c,v 1.6 1997/03/26 18:02:37 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: rwho.c,v 1.7 1997/04/13 02:21:16 deraadt Exp $"; #endif /* not lint */ #include <sys/param.h> @@ -159,7 +159,8 @@ main(argc, argv) mp = myutmp; for (i = 0; i < nusers; i++) { char buf[BUFSIZ]; - (void)sprintf(buf, "%s:%s", mp->myhost, mp->myutmp.out_line); + (void)snprintf(buf, sizeof buf, "%s:%s", mp->myhost, + mp->myutmp.out_line); printf("%-8.8s %-*s %.12s", mp->myutmp.out_name, width, |