keys: initialize data used for measuring authentication delay

This issue was found in a Frama-C analysis.
This commit is contained in:
Miroslav Lichvar 2018-06-20 14:36:28 +02:00
parent 9a6369d8f1
commit 9b34556952

2
keys.c
View file

@ -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,