Skip to content

Commit

Permalink
use std for overflow check
Browse files Browse the repository at this point in the history
  • Loading branch information
sanjit-bhat committed Nov 25, 2024
1 parent cb7b985 commit f7ca97b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kt/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ func checkDig(servSigPk []byte, seenDigs map[uint64]*SigDig, dig *SigDig) *Clien
return stdErr
}
// epoch not too high, which would overflow c.nextEpoch.
if dig.Epoch+1 == 0 {
if !std.SumNoOverflow(dig.Epoch, 1) {
return stdErr
}
// agrees with prior digs.
Expand Down

0 comments on commit f7ca97b

Please sign in to comment.