Module Name: src
Committed By: christos
Date: Thu Feb 9 17:53:56 UTC 2012
Modified Files:
src/external/bsd/ntp/dist/util: ntp-keygen.c
Log Message:
fix printf format.
To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/ntp/dist/util/ntp-keygen.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/external/bsd/ntp/dist/util/ntp-keygen.c
diff -u src/external/bsd/ntp/dist/util/ntp-keygen.c:1.3 src/external/bsd/ntp/dist/util/ntp-keygen.c:1.4
--- src/external/bsd/ntp/dist/util/ntp-keygen.c:1.3 Wed Feb 1 02:46:30 2012
+++ src/external/bsd/ntp/dist/util/ntp-keygen.c Thu Feb 9 12:53:56 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: ntp-keygen.c,v 1.3 2012/02/01 07:46:30 kardel Exp $ */
+/* $NetBSD: ntp-keygen.c,v 1.4 2012/02/09 17:53:56 christos Exp $ */
/*
* Program to generate cryptographic keys for ntp clients and servers
@@ -2068,8 +2068,8 @@ fheader (
char linkname[MAXFILENAME]; /* link name */
int temp;
- sprintf(filename, "ntpkey_%s_%s.%lu", file, owner, epoch +
- JAN_1970);
+ snprintf(filename, sizeof(filename), "ntpkey_%s_%s.%lld", file, owner,
+ (long long)(epoch + JAN_1970));
if ((str = fopen(filename, "w")) == NULL) {
perror("Write");
exit (-1);