crypto_data_hkdf/4: do not crash for length > usize::max_value()
For now, we fail silently in such cases.
Noted by in Many thanks!
@@ -5285,11 +5285,12 @@ fn system_call(
usize::try_from(n).unwrap()
}
Ok(Number::Integer(n)) => {
- n.to_usize().unwrap()
+ match n.to_usize() {
+ Some(u) => { u }
+ _ => { self.fail = true; return Ok(()); }
}
- _ => {
- unreachable!()
}
+ _ => { unreachable!() }
};
let ints_list =
