summaryrefslogtreecommitdiff
path: root/sys/lib/libsa/ctime.c
diff options
context:
space:
mode:
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);