crypto_password_hash/3: fail if the number of iterations is too high
Discussed in
@@ -5285,7 +5285,10 @@ fn system_call(
u64::try_from(n).unwrap()
}
Ok(Number::Integer(n)) => {
- n.to_u64().unwrap()
+ match n.to_u64() {
+ Some(i) => { i }
+ None => { self.fail = true; return Ok(()); }
+ }
}
_ => {
unreachable!()
