Checks for overflow during diversifier decryption.
Closes #1370.
Code changes brief
When a diversifier is decrypted, it is truncated if its length exceeds uint64_t bounds. This would only occur due to a malicious sender and should be rejected.
This PR checks the decrypted diversifier length. If it does not precisely match that of an encoded uint64_t, it throws an error.
PR intention
Checks for overflow during diversifier decryption.
Closes #1370.
Code changes brief
When a diversifier is decrypted, it is truncated if its length exceeds
uint64_t
bounds. This would only occur due to a malicious sender and should be rejected.This PR checks the decrypted diversifier length. If it does not precisely match that of an encoded
uint64_t
, it throws an error.