Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/bsd/ntp/dist/util fix printf format.



details:   https://anonhg.NetBSD.org/src/rev/82576ed27499
branches:  trunk
changeset: 773610:82576ed27499
user:      christos <christos%NetBSD.org@localhost>
date:      Thu Feb 09 17:53:56 2012 +0000

description:
fix printf format.

diffstat:

 external/bsd/ntp/dist/util/ntp-keygen.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (20 lines):

diff -r c7735b10f728 -r 82576ed27499 external/bsd/ntp/dist/util/ntp-keygen.c
--- a/external/bsd/ntp/dist/util/ntp-keygen.c   Thu Feb 09 17:07:07 2012 +0000
+++ b/external/bsd/ntp/dist/util/ntp-keygen.c   Thu Feb 09 17:53:56 2012 +0000
@@ -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 @@
        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);



Home | Main Index | Thread Index | Old Index