summaryrefslogtreecommitdiff
path: root/sys/lib/libsa/ctime.c
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2003-06-01 17:00:41 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2003-06-01 17:00:41 +0000
commit173d01b7c1e9a5d7ba5a6c696a8019061dc41bda (patch)
tree8c8b7bb08108dca24afcee3bbe301e8ba6f76e81 /sys/lib/libsa/ctime.c
parent3e42965de9054a39afc4957c4f099218e709ae51 (diff)
strcpy/strcat/sprintf removal in all bootblocks. various testing by
various people. outside of some messy things in src/gnu, only one thing in the main tree now violates this rule: bind
Diffstat (limited to 'sys/lib/libsa/ctime.c')
-rw-r--r--sys/lib/libsa/ctime.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/lib/libsa/ctime.c b/sys/lib/libsa/ctime.c
index d98ab1a013f..9d44dead949 100644
--- a/sys/lib/libsa/ctime.c
+++ b/sys/lib/libsa/ctime.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ctime.c,v 1.2 1998/06/11 01:34:10 mickey Exp $ */
+/* $OpenBSD: ctime.c,v 1.3 2003/06/01 17:00:32 deraadt Exp $ */
/*
* Copyright (c) 1998 Michael Shalayeff
@@ -73,7 +73,7 @@ ctime(clock)
tt--;
/* no field widths in printf() */
- sprintf(buf, "%s %s %d %d:%d:%d %d\n",
+ snprintf(buf, sizeof buf, "%s %s %d %d:%d:%d %d\n",
((wday < 0 || wday >= 7)? "???": wdays[wday]),
((month < 0 || month >= 12)? "???": months[month]),
(int)tt, hh, mm, ss, year);