From: Harlan Stenn Date: Tue, 17 Nov 2015 07:39:48 +0000 (+0000) Subject: Merge psp-at1.ntp.org:/home/stenn/ntp-stable X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a997a63c8addb259d2b2ac4ae57e18c3e629d722;p=thirdparty%2Fntp.git Merge psp-at1.ntp.org:/home/stenn/ntp-stable into psp-at1.ntp.org:/a/local/amd/amd.stage/thump2-g3/export/ntp/home/stenn/ntp-stable-2962 bk: 564ad9c4zrnEWMcjB89B4ktSXh82Dw --- a997a63c8addb259d2b2ac4ae57e18c3e629d722 diff --cc ChangeLog index baf817f54,7780aafd0..d69d10582 --- a/ChangeLog +++ b/ChangeLog @@@ -5,11 -5,12 +5,17 @@@ * [Bug 2954] Version 4.2.8p4 crashes on startup with sig fault - fixed data race conditions in threaded DNS worker. perlinger@ntp.org - limit threading warm-up to linux; FreeBSD bombs on it. perlinger@ntp.org +* [Bug 2957] 'unsigned int' vs 'size_t' format clash. perlinger@ntp.org + - accept key file only if there are no parsing errors + - fixed size_t/u_int format clash + - fixed wrong use of 'strlcpy' + * [Bug 2962] truncation of size_t/ptrdiff_t on 64bit targets. perlinger@ntp.org - - fixed several other warnings (cast-alignment, missing const, missing prorotypes) ++ - fixed several other warnings (cast-alignment, missing const, missing prototypes) + - promote use of 'size_t' for values that express a size + - use ptr-to-const for read-only arguments + - make sure SOCKET values are not truncated (win32-specific) + - format string fixes +* [Bug 2965] Local clock didn't work since 4.2.8p4. Martin Burnicki. * Unity cleanup for FreeBSD-6.4. Harlan Stenn. * Unity test cleanup. Harlan Stenn. --- diff --cc libntp/authkeys.c index 5bd696cc2,c84df4490..f7462a246 --- a/libntp/authkeys.c +++ b/libntp/authkeys.c @@@ -657,9 -645,9 +657,9 @@@ size_ authencrypt( keyid_t keyno, u_int32 * pkt, - int length + size_t length ) -{\ +{ /* * A zero key identifier means the sender has not verified * the last message was correctly authenticated. The MAC diff --cc tests/sandbox/uglydate.c index d4a30e395,519bddca6..394d59436 --- a/tests/sandbox/uglydate.c +++ b/tests/sandbox/uglydate.c @@@ -5,10 -5,11 +5,11 @@@ //#include "ntp_stdlib.h" //#include "libntptest.h" -extern void test_ConstantDateTime(void); +void test_ConstantDateTime(void); void - test_ConstantDateTime(void) { + test_ConstantDateTime(void) + { const u_int32 HALF = 2147483648UL; l_fp e_time = {{3485080800UL}, HALF}; // 2010-06-09 14:00:00.5