From: Dave Hart Date: Sun, 30 Jul 2023 22:14:18 +0000 (+0000) Subject: [Bug 3842] Windows ntpd ppsapi DLL load failure crashes. X-Git-Tag: NTP_4_2_8P18_RC1~37^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=091bfdd954bac55f6426f96a60dca72daa17943c;p=thirdparty%2Fntp.git [Bug 3842] Windows ntpd ppsapi DLL load failure crashes. bk: 64c6e0baR35M6TZ4MCfqC0SFD-Bs_A --- diff --git a/ChangeLog b/ChangeLog index b04fac441..b0b9dccfb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,6 +3,7 @@ * [Bug 3850] ntpq -c apeers breaks column formatting s2 w/refclock refid. * [Bug 3846] Use -Wno-format-truncation by default. +* [Bug 3842] Windows ntpd ppsapi DLL load failure crashes. * [Bug 3841] 4.2.8p17 build break w/ gcc 12 -Wformat-security without -Wformat Need to remove --Wformat-security when removing -Wformat to silence numerous libopts warnings. diff --git a/ports/winnt/ntpd/nt_ppsimpl.c b/ports/winnt/ntpd/nt_ppsimpl.c index 632349a4f..be1898d49 100644 --- a/ports/winnt/ntpd/nt_ppsimpl.c +++ b/ports/winnt/ntpd/nt_ppsimpl.c @@ -456,7 +456,7 @@ load_pps_provider( HMODULE hmod; pppsapi_prov_init pprov_init; - prov = emalloc(sizeof(*prov)); + prov = emalloc_zero(sizeof(*prov)); hmod = LoadLibraryA(dllpath); if (NULL == hmod) { msyslog(LOG_WARNING, msgfmt, dllpath,