diff options
Diffstat (limited to 'openpgp/src/types/mod.rs')
-rw-r--r-- | openpgp/src/types/mod.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/openpgp/src/types/mod.rs b/openpgp/src/types/mod.rs index 8bc4009e..dedc5af7 100644 --- a/openpgp/src/types/mod.rs +++ b/openpgp/src/types/mod.rs @@ -519,7 +519,11 @@ impl Arbitrary for Curve { 4 => Curve::BrainpoolP512, 5 => Curve::Ed25519, 6 => Curve::Cv25519, - 7 => Curve::Unknown(Vec::<u8>::arbitrary(g).into_boxed_slice()), + 7 => Curve::Unknown({ + let mut k = <Vec<u8>>::arbitrary(g); + k.truncate(255); + k.into_boxed_slice() + }), _ => unreachable!(), } } |