=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/w/pr_time.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- src/usr.bin/w/pr_time.c 1996/07/13 17:24:50 1.7 +++ src/usr.bin/w/pr_time.c 1997/03/25 21:25:59 1.8 @@ -1,4 +1,4 @@ -/* $OpenBSD: pr_time.c,v 1.7 1996/07/13 17:24:50 deraadt Exp $ */ +/* $OpenBSD: pr_time.c,v 1.8 1997/03/25 21:25:59 deraadt Exp $ */ /*- * Copyright (c) 1990, 1993, 1994 @@ -81,7 +81,8 @@ (void)strcpy(fmt, __CONCAT("%l:%", "M%p")); } - (void)strftime(buf, sizeof(buf), fmt, tp); + (void)strftime(buf, sizeof(buf) -1, fmt, tp); + buf[sizeof buf - 1] = '\0'; (void)printf("%s", buf); }