summaryrefslogtreecommitdiff
path: root/kerberosIV/kdb_edit
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>1996-09-16 18:49:09 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>1996-09-16 18:49:09 +0000
commit02748c634c0f2a48d333e7a2d406e5c71f0d99d5 (patch)
tree9e39387bdac863b493ec3e1814653b685941d9d9 /kerberosIV/kdb_edit
parent0eeac555bd0aef9e6d8326dd8e1ae341f7239a98 (diff)
sprintf -> snprintf paranoia
Diffstat (limited to 'kerberosIV/kdb_edit')
-rw-r--r--kerberosIV/kdb_edit/kdb_edit.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/kerberosIV/kdb_edit/kdb_edit.c b/kerberosIV/kdb_edit/kdb_edit.c
index a1faefa95b9..256a39a8d2f 100644
--- a/kerberosIV/kdb_edit/kdb_edit.c
+++ b/kerberosIV/kdb_edit/kdb_edit.c
@@ -1,4 +1,4 @@
-/* $Id: kdb_edit.c,v 1.1 1995/12/14 06:52:42 tholo Exp $ */
+/* $Id: kdb_edit.c,v 1.2 1996/09/16 18:48:53 millert Exp $ */
/*-
* Copyright 1987, 1988 by the Student Information Processing Board
@@ -130,9 +130,10 @@ change_principal(void)
principal_data[0].key_version = 0; /* bumped up later */
}
tp = k_localtime(&principal_data[0].exp_date);
- (void) sprintf(principal_data[0].exp_date_txt, "%4d-%02d-%02d",
- tp->tm_year > 1900 ? tp->tm_year : tp->tm_year + 1900,
- tp->tm_mon + 1, tp->tm_mday); /* January is 0, not 1 */
+ (void) snprintf(principal_data[0].exp_date_txt,
+ sizeof(principal_data[0].exp_date_txt), "%4d-%02d-%02d",
+ tp->tm_year > 1900 ? tp->tm_year : tp->tm_year + 1900,
+ tp->tm_mon + 1, tp->tm_mday); /* January is 0, not 1 */
for (i = 0; i < j; i++) {
for (;;) {
fprintf(stdout,