From: Miroslav Lichvar Date: Wed, 20 Jun 2018 12:36:28 +0000 (+0200) Subject: keys: initialize data used for measuring authentication delay X-Git-Tag: 3.4-pre1~80 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9b34556952adefed8163477e123fcbafa9844825;p=thirdparty%2Fchrony.git keys: initialize data used for measuring authentication delay This issue was found in a Frama-C analysis. --- diff --git a/keys.c b/keys.c index 74b57c45..61ffb91c 100644 --- a/keys.c +++ b/keys.c @@ -107,6 +107,8 @@ determine_hash_delay(uint32_t key_id) double diff, min_diff; int i, nsecs; + memset(&pkt, 0, sizeof (pkt)); + for (i = 0; i < 10; i++) { LCL_ReadRawTime(&before); KEY_GenerateAuth(key_id, (unsigned char *)&pkt, NTP_NORMAL_PACKET_LENGTH,