snarkVM icon indicating copy to clipboard operation
snarkVM copied to clipboard

[Testnet3] Guard blake digest length with `saturating_add`

Open raychu86 opened this issue 3 years ago • 0 comments

Motivation

This PR guards the number of rounds in Blake2Xs::evaluate with saturating_add to prevent overflows. This is a minor fix because having to hash an input of size u16::MAX is very unlikely.

Tracking PR: #957

raychu86 avatar Aug 12 '22 04:08 raychu86