From: Juergen Perlinger Date: Fri, 9 Apr 2010 16:33:43 +0000 (-0400) Subject: fixed minor format glitch in ntpd/ntpd.c X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cf6f04d682d25d6c86ac156e2e863971c6a8b950;p=thirdparty%2Fntp.git fixed minor format glitch in ntpd/ntpd.c bk: 4bbf56e7GqnT8pOIpsbfqBYYAkwIqw --- diff --git a/ntpd/ntpd.c b/ntpd/ntpd.c index a627061ceb..e5ebe978f6 100644 --- a/ntpd/ntpd.c +++ b/ntpd/ntpd.c @@ -357,8 +357,11 @@ change_logfile( octets += strlen(syslog_fname); octets += 1; /* NUL terminator */ abs_fname = emalloc(octets); + /* It's strictly assumed that cd_octets fits into + * an 'int' without overflow or sign change! + */ snprintf(abs_fname, octets, "%.*s%c%s", - (u_int)cd_octets, curdir, DIR_SEP, + (int)cd_octets, curdir, DIR_SEP, syslog_fname); } else #endif