diff options
Diffstat (limited to 'ntpd/ntp_crypto.c')
-rw-r--r-- | ntpd/ntp_crypto.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/ntpd/ntp_crypto.c b/ntpd/ntp_crypto.c index f2df4da8fcf4..2f82c4cfb0dc 100644 --- a/ntpd/ntp_crypto.c +++ b/ntpd/ntp_crypto.c @@ -353,8 +353,8 @@ make_keylist( * included in the hash is zero if broadcast mode, the peer * cookie if client mode or the host cookie if symmetric modes. */ - mpoll = 1 << min(peer->ppoll, peer->hpoll); - lifetime = min(1U << sys_automax, NTP_MAXSESSION * mpoll); + mpoll = 1U << min(peer->ppoll, peer->hpoll); + lifetime = min((1UL << sys_automax), NTP_MAXSESSION * mpoll); if (peer->hmode == MODE_BROADCAST) cookie = 0; else @@ -1486,7 +1486,8 @@ crypto_verify( return (XEVNT_LEN); i = (vallen + 3) / 4; - siglen = ntohl(ep->pkt[i++]); + siglen = ntohl(ep->pkt[i]); + ++i; if ( siglen > MAX_VALLEN || len - VALUE_LEN < ((vallen + 3) / 4) * 4 || len - VALUE_LEN - ((vallen + 3) / 4) * 4 |